Annotation of /trunk/systemd/patches/systemd-9-magellan.patch
Parent Directory | Revision Log
Revision 1130 -
(hide annotations)
(download)
Tue Sep 14 21:21:37 2010 UTC (14 years ago) by niro
File size: 10258 byte(s)
Tue Sep 14 21:21:37 2010 UTC (14 years ago) by niro
File size: 10258 byte(s)
-added magellan patch for systemd
1 | niro | 1130 | diff -Naur systemd-9/configure.ac systemd-9-magellan/configure.ac |
2 | --- systemd-9/configure.ac 2010-09-03 04:49:55.000000000 +0200 | ||
3 | +++ systemd-9-magellan/configure.ac 2010-09-14 23:09:35.000000000 +0200 | ||
4 | @@ -245,7 +245,7 @@ | ||
5 | |||
6 | AC_PATH_PROG([M4], [m4]) | ||
7 | |||
8 | -AC_ARG_WITH(distro, AS_HELP_STRING([--with-distro=DISTRO],[Specify the distribution to target: One of fedora, suse, debian, arch, gentoo, slackware or other])) | ||
9 | +AC_ARG_WITH(distro, AS_HELP_STRING([--with-distro=DISTRO],[Specify the distribution to target: One of fedora, suse, debian, arch, gentoo, magellan, slackware or other])) | ||
10 | if test "z$with_distro" = "z"; then | ||
11 | if test "$cross_compiling" = yes; then | ||
12 | AC_MSG_WARN([Target distribution cannot be reliably detected when cross-compiling. You should specify it with --with-distro (see $0 --help for recognized distros)]) | ||
13 | @@ -255,6 +255,7 @@ | ||
14 | AC_CHECK_FILE(/etc/debian_version,with_distro="debian") | ||
15 | AC_CHECK_FILE(/etc/arch-release,with_distro="arch") | ||
16 | AC_CHECK_FILE(/etc/gentoo-release,with_distro="gentoo") | ||
17 | + AC_CHECK_FILE(/etc/mageversion,with_distro="magellan") | ||
18 | AC_CHECK_FILE(/etc/slackware-version,with_distro="slackware") | ||
19 | fi | ||
20 | if test "z$with_distro" = "z"; then | ||
21 | @@ -314,6 +315,13 @@ | ||
22 | AC_DEFINE(TARGET_GENTOO, [], [Target is Gentoo]) | ||
23 | M4_DISTRO_FLAG=-DTARGET_GENTOO=1 | ||
24 | ;; | ||
25 | + magellan) | ||
26 | + SYSTEM_SYSVINIT_PATH=/etc/rc.d/init.d | ||
27 | + SYSTEM_SYSVRCND_PATH=/etc | ||
28 | + SPECIAL_SYSLOG_SERVICE=syslog-ng.service | ||
29 | + AC_DEFINE(TARGET_MAGELLAN, [], [Target is Magellan]) | ||
30 | + M4_DISTRO_FLAG=-DTARGET_MAGELLAN=1 | ||
31 | + ;; | ||
32 | slackware) | ||
33 | SYSTEM_SYSVINIT_PATH=/etc/rc.d/init.d | ||
34 | SYSTEM_SYSVRCND_PATH=/etc/rc.d | ||
35 | @@ -361,6 +369,7 @@ | ||
36 | AM_CONDITIONAL(TARGET_DEBIAN, test x"$with_distro" = xdebian) | ||
37 | AM_CONDITIONAL(TARGET_ARCH, test x"$with_distro" = xarch) | ||
38 | AM_CONDITIONAL(TARGET_GENTOO, test x"$with_distro" = xgentoo) | ||
39 | +AM_CONDITIONAL(TARGET_MAGELLAN, test x"$with_distro" = xmagellan) | ||
40 | AM_CONDITIONAL(TARGET_SLACKWARE, test x"$with_distro" = xslackware) | ||
41 | |||
42 | AC_DEFINE_UNQUOTED(SPECIAL_SYSLOG_SERVICE, ["$SPECIAL_SYSLOG_SERVICE"], [Syslog service name]) | ||
43 | diff -Naur systemd-9/Makefile.am systemd-9-magellan/Makefile.am | ||
44 | --- systemd-9/Makefile.am 2010-09-03 05:07:34.000000000 +0200 | ||
45 | +++ systemd-9-magellan/Makefile.am 2010-09-14 23:25:01.000000000 +0200 | ||
46 | @@ -247,6 +247,15 @@ | ||
47 | units/gentoo/xdm.service | ||
48 | endif | ||
49 | |||
50 | +if TARGET_MAGELLAN | ||
51 | +dist_systemunit_DATA += \ | ||
52 | + units/magellan/halt.service \ | ||
53 | + units/magellan/sendsignals.service \ | ||
54 | + units/magellan/poweroff.service \ | ||
55 | + units/magellan/reboot.service \ | ||
56 | + units/magellan/xdm.service | ||
57 | +endif | ||
58 | + | ||
59 | if TARGET_ARCH | ||
60 | dist_systemunit_DATA += \ | ||
61 | units/arch/sysinit.service \ | ||
62 | @@ -952,6 +961,14 @@ | ||
63 | rm -f xdm.service && \ | ||
64 | $(LN_S) $(systemunitdir)/xdm.service xdm.service ) | ||
65 | endif | ||
66 | +if TARGET_MAGELLAN | ||
67 | + ( cd $(DESTDIR)$(pkgsysconfdir)/system && \ | ||
68 | + rm -f display-manager.service && \ | ||
69 | + $(LN_S) $(systemunitdir)/xdm.service display-manager.service ) | ||
70 | + ( cd $(DESTDIR)$(pkgsysconfdir)/system/graphical.target.wants && \ | ||
71 | + rm -f xdm.service && \ | ||
72 | + $(LN_S) $(systemunitdir)/xdm.service xdm.service ) | ||
73 | +endif | ||
74 | if !TARGET_SUSE | ||
75 | ( cd $(DESTDIR)$(systemunitdir) && \ | ||
76 | rm -f fsck.target && \ | ||
77 | diff -Naur systemd-9/src/hostname-setup.c systemd-9-magellan/src/hostname-setup.c | ||
78 | --- systemd-9/src/hostname-setup.c 2010-09-03 00:21:17.000000000 +0200 | ||
79 | +++ systemd-9-magellan/src/hostname-setup.c 2010-09-14 23:11:24.000000000 +0200 | ||
80 | @@ -137,7 +137,7 @@ | ||
81 | fclose(f); | ||
82 | return r; | ||
83 | |||
84 | -#elif defined(TARGET_SUSE) || defined(TARGET_SLACKWARE) | ||
85 | +#elif defined(TARGET_SUSE) || defined(TARGET_SLACKWARE) || defined(TARGET_MAGELLAN) | ||
86 | return read_and_strip_hostname(FILENAME, hn); | ||
87 | #else | ||
88 | return -ENOENT; | ||
89 | diff -Naur systemd-9/src/util.c systemd-9-magellan/src/util.c | ||
90 | --- systemd-9/src/util.c 2010-09-03 00:21:17.000000000 +0200 | ||
91 | +++ systemd-9-magellan/src/util.c 2010-09-14 23:17:34.000000000 +0200 | ||
92 | @@ -2835,6 +2835,17 @@ | ||
93 | |||
94 | status_printf("Welcome to \x1B[0;32m%s\x1B[0m!\n", r); /* Green for SUSE */ | ||
95 | free(r); | ||
96 | +#elif defined(TARGET_MAGELLAN) | ||
97 | + char *r; | ||
98 | + | ||
99 | + if (read_one_line_file("/etc/gentoo-release", &r) < 0) | ||
100 | + return; | ||
101 | + | ||
102 | + truncate_nl(r); | ||
103 | + | ||
104 | + status_printf("Welcome to \x1B[1;34mMAGELLAN (v%s) Linux\x1B[0m!\n", r); /* Light Blue for Magellan */ | ||
105 | + | ||
106 | + free(r); | ||
107 | #else | ||
108 | #warning "You probably should add a welcome text logic here." | ||
109 | #endif | ||
110 | diff -Naur systemd-9/units/getty@.service.m4 systemd-9-magellan/units/getty@.service.m4 | ||
111 | --- systemd-9/units/getty@.service.m4 2010-08-26 02:57:31.000000000 +0200 | ||
112 | +++ systemd-9-magellan/units/getty@.service.m4 2010-09-14 23:19:47.000000000 +0200 | ||
113 | @@ -9,6 +9,7 @@ | ||
114 | m4_ifdef(`TARGET_SUSE', `m4_define(`GETTY', `/sbin/mingetty')')m4_dnl | ||
115 | m4_ifdef(`TARGET_DEBIAN', `m4_define(`GETTY', `/sbin/getty 38400')')m4_dnl | ||
116 | m4_ifdef(`TARGET_GENTOO', `m4_define(`GETTY', `/sbin/agetty 38400')')m4_dnl | ||
117 | +m4_ifdef(`TARGET_MAGELLAN', `m4_define(`GETTY', `/sbin/agetty 38400')')m4_dnl | ||
118 | m4_ifdef(`TARGET_ARCH', `m4_define(`GETTY', `/sbin/agetty -8 38400')')m4_dnl | ||
119 | m4_dnl | ||
120 | [Unit] | ||
121 | diff -Naur systemd-9/units/graphical.target.m4 systemd-9-magellan/units/graphical.target.m4 | ||
122 | --- systemd-9/units/graphical.target.m4 2010-08-30 23:03:58.000000000 +0200 | ||
123 | +++ systemd-9-magellan/units/graphical.target.m4 2010-09-14 23:22:10.000000000 +0200 | ||
124 | @@ -20,6 +20,9 @@ | ||
125 | m4_ifdef(`TARGET_SUSE', | ||
126 | Names=runlevel5.target | ||
127 | )m4_dnl | ||
128 | +m4_ifdef(`TARGET_MAGELLAN', | ||
129 | +Names=runlevel5.target | ||
130 | +)m4_dnl | ||
131 | AllowIsolate=yes | ||
132 | |||
133 | [Install] | ||
134 | diff -Naur systemd-9/units/magellan/halt.service systemd-9-magellan/units/magellan/halt.service | ||
135 | --- systemd-9/units/magellan/halt.service 1970-01-01 01:00:00.000000000 +0100 | ||
136 | +++ systemd-9-magellan/units/magellan/halt.service 2010-09-14 22:59:13.000000000 +0200 | ||
137 | @@ -0,0 +1,19 @@ | ||
138 | +# This file is part of systemd. | ||
139 | +# | ||
140 | +# systemd is free software; you can redistribute it and/or modify it | ||
141 | +# under the terms of the GNU General Public License as published by | ||
142 | +# the Free Software Foundation; either version 2 of the License, or | ||
143 | +# (at your option) any later version. | ||
144 | + | ||
145 | +[Unit] | ||
146 | +Description=Halt | ||
147 | +DefaultDependencies=no | ||
148 | +Requires=shutdown.target umount.target sendsignals.service | ||
149 | +After=shutdown.target umount.target sendsignals.service | ||
150 | + | ||
151 | +[Service] | ||
152 | +Type=oneshot | ||
153 | +RemainAfterExit=yes | ||
154 | +Environment=RUNLEVEL=0 | ||
155 | +ExecStart=/etc/init.d/halt start | ||
156 | +StandardOutput=tty | ||
157 | diff -Naur systemd-9/units/magellan/poweroff.service systemd-9-magellan/units/magellan/poweroff.service | ||
158 | --- systemd-9/units/magellan/poweroff.service 1970-01-01 01:00:00.000000000 +0100 | ||
159 | +++ systemd-9-magellan/units/magellan/poweroff.service 2010-09-14 23:00:25.000000000 +0200 | ||
160 | @@ -0,0 +1,19 @@ | ||
161 | +# This file is part of systemd. | ||
162 | +# | ||
163 | +# systemd is free software; you can redistribute it and/or modify it | ||
164 | +# under the terms of the GNU General Public License as published by | ||
165 | +# the Free Software Foundation; either version 2 of the License, or | ||
166 | +# (at your option) any later version. | ||
167 | + | ||
168 | +[Unit] | ||
169 | +Description=Power-Off | ||
170 | +DefaultDependencies=no | ||
171 | +Requires=shutdown.target umount.target sendsignals.service | ||
172 | +After=shutdown.target umount.target sendsignals.service | ||
173 | + | ||
174 | +[Service] | ||
175 | +Type=oneshot | ||
176 | +RemainAfterExit=yes | ||
177 | +Environment=RUNLEVEL=0 | ||
178 | +ExecStart=/etc/init.d/halt start | ||
179 | +StandardOutput=tty | ||
180 | diff -Naur systemd-9/units/magellan/reboot.service systemd-9-magellan/units/magellan/reboot.service | ||
181 | --- systemd-9/units/magellan/reboot.service 1970-01-01 01:00:00.000000000 +0100 | ||
182 | +++ systemd-9-magellan/units/magellan/reboot.service 2010-09-14 23:02:28.000000000 +0200 | ||
183 | @@ -0,0 +1,19 @@ | ||
184 | +# This file is part of systemd. | ||
185 | +# | ||
186 | +# systemd is free software; you can redistribute it and/or modify it | ||
187 | +# under the terms of the GNU General Public License as published by | ||
188 | +# the Free Software Foundation; either version 2 of the License, or | ||
189 | +# (at your option) any later version. | ||
190 | + | ||
191 | +[Unit] | ||
192 | +Description=Reboot | ||
193 | +DefaultDependencies=no | ||
194 | +Requires=shutdown.target umount.target sendsignals.service | ||
195 | +After=shutdown.target umount.target sendsignals.service | ||
196 | + | ||
197 | +[Service] | ||
198 | +Type=oneshot | ||
199 | +RemainAfterExit=yes | ||
200 | +Environment=RUNLEVEL=6 | ||
201 | +ExecStart=/etc/init.d/reboot start | ||
202 | +StandardOutput=tty | ||
203 | diff -Naur systemd-9/units/magellan/sendsignals.service systemd-9-magellan/units/magellan/sendsignals.service | ||
204 | --- systemd-9/units/magellan/sendsignals.service 1970-01-01 01:00:00.000000000 +0100 | ||
205 | +++ systemd-9-magellan/units/magellan/sendsignals.service 2010-09-14 22:58:27.000000000 +0200 | ||
206 | @@ -0,0 +1,18 @@ | ||
207 | +# This file is part of systemd. | ||
208 | +# | ||
209 | +# systemd is free software; you can redistribute it and/or modify it | ||
210 | +# under the terms of the GNU General Public License as published by | ||
211 | +# the Free Software Foundation; either version 2 of the License, or | ||
212 | +# (at your option) any later version. | ||
213 | + | ||
214 | +[Unit] | ||
215 | +Description=Kill All Processes | ||
216 | +DefaultDependencies=no | ||
217 | +After=shutdown.target | ||
218 | +RefuseManualStart=yes | ||
219 | + | ||
220 | +[Service] | ||
221 | +Type=oneshot | ||
222 | +RemainAfterExit=yes | ||
223 | +ExecStart=-/etc/init.d/sendsignals start | ||
224 | +StandardOutput=tty | ||
225 | diff -Naur systemd-9/units/magellan/xdm.service systemd-9-magellan/units/magellan/xdm.service | ||
226 | --- systemd-9/units/magellan/xdm.service 1970-01-01 01:00:00.000000000 +0100 | ||
227 | +++ systemd-9-magellan/units/magellan/xdm.service 2010-09-14 23:01:18.000000000 +0200 | ||
228 | @@ -0,0 +1,17 @@ | ||
229 | +# This file is part of systemd. | ||
230 | +# | ||
231 | +# systemd is free software; you can redistribute it and/or modify it | ||
232 | +# under the terms of the GNU General Public License as published by | ||
233 | +# the Free Software Foundation; either version 2 of the License, or | ||
234 | +# (at your option) any later version. | ||
235 | + | ||
236 | +[Unit] | ||
237 | +Description=Display Manager | ||
238 | +After=syslog.target dbus.target hald.service | ||
239 | + | ||
240 | +[Service] | ||
241 | +ExecStart=/etc/init.d/xdm start | ||
242 | + | ||
243 | +[Install] | ||
244 | +Alias=display-manager.service | ||
245 | +WantedBy=graphical.target | ||
246 | diff -Naur systemd-9/units/multi-user.target.m4 systemd-9-magellan/units/multi-user.target.m4 | ||
247 | --- systemd-9/units/multi-user.target.m4 2010-08-30 23:03:58.000000000 +0200 | ||
248 | +++ systemd-9-magellan/units/multi-user.target.m4 2010-09-14 23:21:53.000000000 +0200 | ||
249 | @@ -20,6 +20,10 @@ | ||
250 | m4_ifdef(`TARGET_SUSE', | ||
251 | Names=runlevel3.target | ||
252 | )m4_dnl | ||
253 | +)m4_dnl | ||
254 | +m4_ifdef(`TARGET_MAGELLAN', | ||
255 | +Names=runlevel3.target | ||
256 | +)m4_dnl | ||
257 | AllowIsolate=yes | ||
258 | |||
259 | [Install] |