Magellan Linux

Contents of /trunk/systemd/patches/systemd-9-magellan.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1132 - (show annotations) (download)
Tue Sep 14 21:33:49 2010 UTC (13 years, 7 months ago) by niro
File size: 10572 byte(s)
-fixed missing hostname file definition
1 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:37:21.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/rc.d
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:37:21.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:38:13.000000000 +0200
80 @@ -34,6 +34,8 @@
81 #define FILENAME "/etc/sysconfig/network"
82 #elif defined(TARGET_SUSE) || defined(TARGET_SLACKWARE)
83 #define FILENAME "/etc/HOSTNAME"
84 +#elif defined(TARGET_MAGELLAN)
85 +#define FILENAME "/etc/hostname"
86 #elif defined(TARGET_ARCH)
87 #define FILENAME "/etc/rc.conf"
88 #elif defined(TARGET_GENTOO)
89 @@ -137,7 +139,7 @@
90 fclose(f);
91 return r;
92
93 -#elif defined(TARGET_SUSE) || defined(TARGET_SLACKWARE)
94 +#elif defined(TARGET_SUSE) || defined(TARGET_SLACKWARE) || defined(TARGET_MAGELLAN)
95 return read_and_strip_hostname(FILENAME, hn);
96 #else
97 return -ENOENT;
98 diff -Naur systemd-9/src/util.c systemd-9-magellan/src/util.c
99 --- systemd-9/src/util.c 2010-09-03 00:21:17.000000000 +0200
100 +++ systemd-9-magellan/src/util.c 2010-09-14 23:37:21.000000000 +0200
101 @@ -2835,6 +2835,17 @@
102
103 status_printf("Welcome to \x1B[0;32m%s\x1B[0m!\n", r); /* Green for SUSE */
104 free(r);
105 +#elif defined(TARGET_MAGELLAN)
106 + char *r;
107 +
108 + if (read_one_line_file("/etc/gentoo-release", &r) < 0)
109 + return;
110 +
111 + truncate_nl(r);
112 +
113 + status_printf("Welcome to \x1B[1;34mMAGELLAN (v%s) Linux\x1B[0m!\n", r); /* Light Blue for Magellan */
114 +
115 + free(r);
116 #else
117 #warning "You probably should add a welcome text logic here."
118 #endif
119 diff -Naur systemd-9/units/getty@.service.m4 systemd-9-magellan/units/getty@.service.m4
120 --- systemd-9/units/getty@.service.m4 2010-08-26 02:57:31.000000000 +0200
121 +++ systemd-9-magellan/units/getty@.service.m4 2010-09-14 23:37:21.000000000 +0200
122 @@ -9,6 +9,7 @@
123 m4_ifdef(`TARGET_SUSE', `m4_define(`GETTY', `/sbin/mingetty')')m4_dnl
124 m4_ifdef(`TARGET_DEBIAN', `m4_define(`GETTY', `/sbin/getty 38400')')m4_dnl
125 m4_ifdef(`TARGET_GENTOO', `m4_define(`GETTY', `/sbin/agetty 38400')')m4_dnl
126 +m4_ifdef(`TARGET_MAGELLAN', `m4_define(`GETTY', `/sbin/agetty 38400')')m4_dnl
127 m4_ifdef(`TARGET_ARCH', `m4_define(`GETTY', `/sbin/agetty -8 38400')')m4_dnl
128 m4_dnl
129 [Unit]
130 diff -Naur systemd-9/units/graphical.target.m4 systemd-9-magellan/units/graphical.target.m4
131 --- systemd-9/units/graphical.target.m4 2010-08-30 23:03:58.000000000 +0200
132 +++ systemd-9-magellan/units/graphical.target.m4 2010-09-14 23:37:21.000000000 +0200
133 @@ -20,6 +20,9 @@
134 m4_ifdef(`TARGET_SUSE',
135 Names=runlevel5.target
136 )m4_dnl
137 +m4_ifdef(`TARGET_MAGELLAN',
138 +Names=runlevel5.target
139 +)m4_dnl
140 AllowIsolate=yes
141
142 [Install]
143 diff -Naur systemd-9/units/magellan/halt.service systemd-9-magellan/units/magellan/halt.service
144 --- systemd-9/units/magellan/halt.service 1970-01-01 01:00:00.000000000 +0100
145 +++ systemd-9-magellan/units/magellan/halt.service 2010-09-14 23:37:21.000000000 +0200
146 @@ -0,0 +1,19 @@
147 +# This file is part of systemd.
148 +#
149 +# systemd is free software; you can redistribute it and/or modify it
150 +# under the terms of the GNU General Public License as published by
151 +# the Free Software Foundation; either version 2 of the License, or
152 +# (at your option) any later version.
153 +
154 +[Unit]
155 +Description=Halt
156 +DefaultDependencies=no
157 +Requires=shutdown.target umount.target sendsignals.service
158 +After=shutdown.target umount.target sendsignals.service
159 +
160 +[Service]
161 +Type=oneshot
162 +RemainAfterExit=yes
163 +Environment=RUNLEVEL=0
164 +ExecStart=/etc/init.d/halt start
165 +StandardOutput=tty
166 diff -Naur systemd-9/units/magellan/poweroff.service systemd-9-magellan/units/magellan/poweroff.service
167 --- systemd-9/units/magellan/poweroff.service 1970-01-01 01:00:00.000000000 +0100
168 +++ systemd-9-magellan/units/magellan/poweroff.service 2010-09-14 23:37:21.000000000 +0200
169 @@ -0,0 +1,19 @@
170 +# This file is part of systemd.
171 +#
172 +# systemd is free software; you can redistribute it and/or modify it
173 +# under the terms of the GNU General Public License as published by
174 +# the Free Software Foundation; either version 2 of the License, or
175 +# (at your option) any later version.
176 +
177 +[Unit]
178 +Description=Power-Off
179 +DefaultDependencies=no
180 +Requires=shutdown.target umount.target sendsignals.service
181 +After=shutdown.target umount.target sendsignals.service
182 +
183 +[Service]
184 +Type=oneshot
185 +RemainAfterExit=yes
186 +Environment=RUNLEVEL=0
187 +ExecStart=/etc/init.d/halt start
188 +StandardOutput=tty
189 diff -Naur systemd-9/units/magellan/reboot.service systemd-9-magellan/units/magellan/reboot.service
190 --- systemd-9/units/magellan/reboot.service 1970-01-01 01:00:00.000000000 +0100
191 +++ systemd-9-magellan/units/magellan/reboot.service 2010-09-14 23:37:21.000000000 +0200
192 @@ -0,0 +1,19 @@
193 +# This file is part of systemd.
194 +#
195 +# systemd is free software; you can redistribute it and/or modify it
196 +# under the terms of the GNU General Public License as published by
197 +# the Free Software Foundation; either version 2 of the License, or
198 +# (at your option) any later version.
199 +
200 +[Unit]
201 +Description=Reboot
202 +DefaultDependencies=no
203 +Requires=shutdown.target umount.target sendsignals.service
204 +After=shutdown.target umount.target sendsignals.service
205 +
206 +[Service]
207 +Type=oneshot
208 +RemainAfterExit=yes
209 +Environment=RUNLEVEL=6
210 +ExecStart=/etc/init.d/reboot start
211 +StandardOutput=tty
212 diff -Naur systemd-9/units/magellan/sendsignals.service systemd-9-magellan/units/magellan/sendsignals.service
213 --- systemd-9/units/magellan/sendsignals.service 1970-01-01 01:00:00.000000000 +0100
214 +++ systemd-9-magellan/units/magellan/sendsignals.service 2010-09-14 23:37:21.000000000 +0200
215 @@ -0,0 +1,18 @@
216 +# This file is part of systemd.
217 +#
218 +# systemd is free software; you can redistribute it and/or modify it
219 +# under the terms of the GNU General Public License as published by
220 +# the Free Software Foundation; either version 2 of the License, or
221 +# (at your option) any later version.
222 +
223 +[Unit]
224 +Description=Kill All Processes
225 +DefaultDependencies=no
226 +After=shutdown.target
227 +RefuseManualStart=yes
228 +
229 +[Service]
230 +Type=oneshot
231 +RemainAfterExit=yes
232 +ExecStart=-/etc/init.d/sendsignals start
233 +StandardOutput=tty
234 diff -Naur systemd-9/units/magellan/xdm.service systemd-9-magellan/units/magellan/xdm.service
235 --- systemd-9/units/magellan/xdm.service 1970-01-01 01:00:00.000000000 +0100
236 +++ systemd-9-magellan/units/magellan/xdm.service 2010-09-14 23:37:21.000000000 +0200
237 @@ -0,0 +1,17 @@
238 +# This file is part of systemd.
239 +#
240 +# systemd is free software; you can redistribute it and/or modify it
241 +# under the terms of the GNU General Public License as published by
242 +# the Free Software Foundation; either version 2 of the License, or
243 +# (at your option) any later version.
244 +
245 +[Unit]
246 +Description=Display Manager
247 +After=syslog.target dbus.target hald.service
248 +
249 +[Service]
250 +ExecStart=/etc/init.d/xdm start
251 +
252 +[Install]
253 +Alias=display-manager.service
254 +WantedBy=graphical.target
255 diff -Naur systemd-9/units/multi-user.target.m4 systemd-9-magellan/units/multi-user.target.m4
256 --- systemd-9/units/multi-user.target.m4 2010-08-30 23:03:58.000000000 +0200
257 +++ systemd-9-magellan/units/multi-user.target.m4 2010-09-14 23:37:21.000000000 +0200
258 @@ -20,6 +20,10 @@
259 m4_ifdef(`TARGET_SUSE',
260 Names=runlevel3.target
261 )m4_dnl
262 +)m4_dnl
263 +m4_ifdef(`TARGET_MAGELLAN',
264 +Names=runlevel3.target
265 +)m4_dnl
266 AllowIsolate=yes
267
268 [Install]