]>
Commit | Line | Data |
---|---|---|
440d1d13 BZ |
1 | diff --git a/Makefile.am b/Makefile.am |
2 | index 170465a..bce467d 100644 | |
3 | --- a/Makefile.am | |
4 | +++ b/Makefile.am | |
5 | @@ -115,6 +115,12 @@ AM_CPPFLAGS += \ | |
4d29e184 BZ |
6 | -DKBD_SETFONT=\"/usr/bin/setfont\" \ |
7 | -DDEFAULT_FONT=\"LatArCyrHeb-16\" | |
8 | else | |
9 | +if TARGET_PLD | |
10 | +AM_CPPFLAGS += \ | |
11 | + -DKBD_LOADKEYS=\"/usr/bin/loadkeys\" \ | |
12 | + -DKBD_SETFONT=\"/bin/setfont\" \ | |
13 | + -DDEFAULT_FONT=\"LatArCyrHeb-16\" | |
14 | +else | |
15 | AM_CPPFLAGS += \ | |
16 | -DKBD_LOADKEYS=\"/bin/loadkeys\" \ | |
17 | -DKBD_SETFONT=\"/bin/setfont\" \ | |
440d1d13 | 18 | @@ -132,6 +138,7 @@ endif |
4d29e184 BZ |
19 | endif |
20 | endif | |
21 | endif | |
22 | +endif | |
23 | ||
24 | rootbin_PROGRAMS = \ | |
25 | systemd \ | |
440d1d13 BZ |
26 | @@ -381,6 +388,14 @@ |
27 | systemd-rc-local-generator | |
28 | endif | |
29 | ||
30 | +if TARGET_PLD | |
31 | +dist_systemunit_DATA += \ | |
71b99f19 JR |
32 | + units/pld/prefdm.service \ |
33 | + units/pld/halt-local.service | |
440d1d13 BZ |
34 | +systemgenerator_PROGRAMS += \ |
35 | + systemd-rc-local-generator | |
36 | +endif | |
37 | + | |
38 | if TARGET_MANDRIVA | |
39 | dist_systemunit_DATA += \ | |
40 | units/mandriva/prefdm.service \ | |
41 | @@ -1992,6 +1999,23 @@ if TARGET_FEDORA | |
42 | $(LN_S) $(systemunitdir)/display-manager.service display-manager.service ) | |
43 | endif | |
44 | ||
45 | +if TARGET_PLD | |
46 | + $(MKDIR_P) -m 0755 $(DESTDIR)$(systemunitdir)/final.target.wants | |
47 | + ( cd $(DESTDIR)$(systemunitdir)/multi-user.target.wants && \ | |
48 | + rm -f rc-local.service && \ | |
4d29e184 BZ |
49 | + $(LN_S) $(systemunitdir)/rc-local.service rc-local.service ) |
50 | + ( cd $(DESTDIR)$(systemunitdir)/final.target.wants && \ | |
51 | + rm -f halt-local.service && \ | |
52 | + $(LN_S) $(systemunitdir)/halt-local.service halt-local.service ) | |
53 | + ( cd $(DESTDIR)$(systemunitdir) && \ | |
54 | + rm -f display-manager.service single.service && \ | |
55 | + $(LN_S) prefdm.service display-manager.service && \ | |
56 | + $(LN_S) rescue.service single.service ) | |
57 | + ( cd $(DESTDIR)$(systemunitdir)/graphical.target.wants && \ | |
58 | + rm -f display-manager.service && \ | |
59 | + $(LN_S) $(systemunitdir)/display-manager.service display-manager.service ) | |
60 | +endif | |
61 | + | |
440d1d13 BZ |
62 | if TARGET_MANDRIVA |
63 | $(MKDIR_P) -m 0755 $(DESTDIR)$(systemunitdir)/final.target.wants | |
4d29e184 | 64 | ( cd $(DESTDIR)$(systemunitdir)/final.target.wants && \ |
440d1d13 BZ |
65 | diff --git a/configure.ac b/configure.ac |
66 | index 596a32a..f701bfd 100644 | |
67 | --- a/configure.ac | |
68 | +++ b/configure.ac | |
440d1d13 BZ |
69 | @@ -448,6 +449,12 @@ case $with_distro in |
70 | M4_DEFINES=-DTARGET_MANDRIVA=1 | |
71 | have_plymouth=yes | |
72 | ;; | |
73 | + pld) | |
74 | + SYSTEM_SYSVINIT_PATH=/etc/rc.d/init.d | |
75 | + SYSTEM_SYSVRCND_PATH=/etc/rc.d | |
76 | + AC_DEFINE(TARGET_PLD, [], [Target is PLD Linux]) | |
77 | + M4_DISTRO_FLAG=-DTARGET_PLD=1 | |
78 | + ;; | |
79 | meego) | |
80 | SYSTEM_SYSVINIT_PATH= | |
81 | SYSTEM_SYSVRCND_PATH= | |
82 | @@ -510,6 +517,7 @@ if test -n "$enable_plymouth"; then | |
83 | fi | |
84 | ||
85 | AM_CONDITIONAL(TARGET_FEDORA, test x"$with_distro" = xfedora) | |
86 | +AM_CONDITIONAL(TARGET_PLD, test x"$with_distro" = xpld) | |
87 | AM_CONDITIONAL(TARGET_SUSE, test x"$with_distro" = xsuse) | |
88 | AM_CONDITIONAL(TARGET_DEBIAN, test x"$with_distro" = xdebian) | |
89 | AM_CONDITIONAL(TARGET_UBUNTU, test x"$with_distro" = xubuntu) | |
082609ad | 90 | diff --git a/src/fsck/fsck.c b/src/fsck/fsck.c |
440d1d13 | 91 | index 3477ba1..d32718d 100644 |
082609ad JR |
92 | --- a/src/fsck/fsck.c |
93 | +++ b/src/fsck/fsck.c | |
440d1d13 | 94 | @@ -127,7 +127,7 @@ static int parse_proc_cmdline(void) { |
4d29e184 BZ |
95 | arg_skip = true; |
96 | else if (startswith(w, "fsck.mode")) | |
97 | log_warning("Invalid fsck.mode= parameter. Ignoring."); | |
440d1d13 BZ |
98 | -#if defined(TARGET_FEDORA) || defined(TARGET_MANDRIVA) || defined(TARGET_MAGEIA) |
99 | +#if defined(TARGET_FEDORA) || defined(TARGET_PLD) || defined(TARGET_MANDRIVA) || defined(TARGET_MAGEIA) | |
4d29e184 BZ |
100 | else if (strneq(w, "fastboot", l)) |
101 | arg_skip = true; | |
102 | else if (strneq(w, "forcefsck", l)) | |
082609ad | 103 | diff --git a/src/core/hostname-setup.c b/src/core/hostname-setup.c |
440d1d13 | 104 | index 2c2f10c..754f0c7 100644 |
082609ad JR |
105 | --- a/src/core/hostname-setup.c |
106 | +++ b/src/core/hostname-setup.c | |
4d29e184 BZ |
107 | @@ -30,7 +30,7 @@ |
108 | #include "util.h" | |
109 | #include "log.h" | |
110 | ||
440d1d13 BZ |
111 | -#if defined(TARGET_FEDORA) || defined(TARGET_ALTLINUX) || defined(TARGET_MANDRIVA) || defined(TARGET_MEEGO) || defined(TARGET_MAGEIA) |
112 | +#if defined(TARGET_FEDORA) || defined(TARGET_PLD) || defined(TARGET_ALTLINUX) || defined(TARGET_MANDRIVA) || defined(TARGET_MEEGO) || defined(TARGET_MAGEIA) | |
4d29e184 BZ |
113 | #define FILENAME "/etc/sysconfig/network" |
114 | #elif defined(TARGET_SUSE) || defined(TARGET_SLACKWARE) | |
115 | #define FILENAME "/etc/HOSTNAME" | |
440d1d13 | 116 | @@ -64,7 +64,7 @@ static int read_and_strip_hostname(const char *path, char **hn) { |
4d29e184 BZ |
117 | |
118 | static int read_distro_hostname(char **hn) { | |
119 | ||
440d1d13 BZ |
120 | -#if defined(TARGET_FEDORA) || defined(TARGET_ARCH) || defined(TARGET_GENTOO) || defined(TARGET_ALTLINUX) || defined(TARGET_MANDRIVA) || defined(TARGET_MEEGO) || defined(TARGET_MAGEIA) |
121 | +#if defined(TARGET_FEDORA) || defined(TARGET_PLD) || defined(TARGET_ARCH) || defined(TARGET_GENTOO) || defined(TARGET_ALTLINUX) || defined(TARGET_MANDRIVA) || defined(TARGET_MEEGO) || defined(TARGET_MAGEIA) | |
4d29e184 BZ |
122 | int r; |
123 | FILE *f; | |
124 | ||
082609ad | 125 | diff --git a/src/core/locale-setup.c b/src/core/locale-setup.c |
440d1d13 | 126 | index 7f692e9..0a45854 100644 |
082609ad JR |
127 | --- a/src/core/locale-setup.c |
128 | +++ b/src/core/locale-setup.c | |
440d1d13 | 129 | @@ -74,7 +74,7 @@ int locale_setup(void) { |
4d29e184 BZ |
130 | |
131 | if (detect_container(NULL) <= 0) | |
132 | if ((r = parse_env_file("/proc/cmdline", WHITESPACE, | |
133 | -#if defined(TARGET_FEDORA) || defined(TARGET_MEEGO) | |
134 | +#if defined(TARGET_FEDORA) || defined(TARGET_PLD) || defined(TARGET_MEEGO) | |
135 | "LANG", &variables[VARIABLE_LANG], | |
136 | #endif | |
137 | "locale.LANG", &variables[VARIABLE_LANG], | |
440d1d13 | 138 | @@ -121,7 +121,7 @@ int locale_setup(void) { |
4d29e184 BZ |
139 | log_warning("Failed to read /etc/locale.conf: %s", strerror(-r)); |
140 | } | |
141 | ||
142 | -#if defined(TARGET_FEDORA) || defined(TARGET_ALTLINUX) || defined(TARGET_MEEGO) | |
143 | +#if defined(TARGET_FEDORA) || defined(TARGET_PLD) || defined(TARGET_ALTLINUX) || defined(TARGET_MEEGO) | |
144 | if (r <= 0 && | |
145 | (r = parse_env_file("/etc/sysconfig/i18n", NEWLINE, | |
146 | "LANG", &variables[VARIABLE_LANG], | |
082609ad | 147 | diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c |
440d1d13 | 148 | index 298cb4e..cec3974 100644 |
082609ad JR |
149 | --- a/src/systemctl/systemctl.c |
150 | +++ b/src/systemctl/systemctl.c | |
440d1d13 | 151 | @@ -3460,7 +3460,7 @@ finish: |
4d29e184 BZ |
152 | static int enable_sysv_units(char **args) { |
153 | int r = 0; | |
154 | ||
440d1d13 BZ |
155 | -#if defined (HAVE_SYSV_COMPAT) && (defined(TARGET_FEDORA) || defined(TARGET_MANDRIVA) || defined(TARGET_SUSE) || defined(TARGET_MEEGO) || defined(TARGET_ALTLINUX) || defined(TARGET_MAGEIA)) |
156 | +#if defined (HAVE_SYSV_COMPAT) && (defined(TARGET_FEDORA) || defined(TARGET_PLD) || defined(TARGET_MANDRIVA) || defined(TARGET_SUSE) || defined(TARGET_MEEGO) || defined(TARGET_ALTLINUX) || defined(TARGET_MAGEIA)) | |
4d29e184 BZ |
157 | const char *verb = args[0]; |
158 | unsigned f = 1, t = 1; | |
159 | LookupPaths paths; | |
440d1d13 BZ |
160 | diff --git a/src/timedate/timedated.c b/src/timedate/timedated.c |
161 | index 16f54b5..758b9df 100644 | |
162 | --- a/src/timedate/timedated.c | |
163 | +++ b/src/timedate/timedated.c | |
164 | @@ -174,7 +174,7 @@ static int read_data(void) { | |
4d29e184 BZ |
165 | if (r != -ENOENT) |
166 | log_warning("Failed to read /etc/timezone: %s", strerror(-r)); | |
167 | ||
168 | -#ifdef TARGET_FEDORA | |
169 | +#if defined(TARGET_FEDORA) || defined(TARGET_PLD) | |
170 | r = parse_env_file("/etc/sysconfig/clock", NEWLINE, | |
171 | "ZONE", &zone, | |
172 | NULL); | |
440d1d13 BZ |
173 | diff --git a/src/vconsole/vconsole-setup.c b/src/vconsole/vconsole-setup.c |
174 | index 9196789..1d1a916 100644 | |
175 | --- a/src/vconsole/vconsole-setup.c | |
176 | +++ b/src/vconsole/vconsole-setup.c | |
177 | @@ -230,7 +230,7 @@ int main(int argc, char **argv) { | |
4d29e184 BZ |
178 | } |
179 | ||
180 | if (r <= 0) { | |
181 | -#if defined(TARGET_FEDORA) || defined(TARGET_MEEGO) | |
182 | +#if defined(TARGET_FEDORA) || defined(TARGET_PLD) || defined(TARGET_MEEGO) | |
082609ad | 183 | r = parse_env_file("/etc/sysconfig/i18n", NEWLINE, |
4d29e184 BZ |
184 | "SYSFONT", &vc_font, |
185 | "SYSFONTACM", &vc_font_map, | |
082609ad | 186 | diff --git a/units/console-shell.service.m4.in b/units/console-shell.service.m4.in |
440d1d13 | 187 | index 02adc84..a9f31fd 100644 |
082609ad JR |
188 | --- a/units/console-shell.service.m4.in |
189 | +++ b/units/console-shell.service.m4.in | |
440d1d13 | 190 | @@ -11,6 +11,9 @@ After=systemd-user-sessions.service plymouth-quit-wait.service |
4d29e184 BZ |
191 | m4_ifdef(`TARGET_FEDORA', |
192 | After=rc-local.service | |
193 | )m4_dnl | |
194 | +m4_ifdef(`TARGET_PLD', | |
195 | +After=rc-local.service | |
196 | +)m4_dnl | |
197 | m4_ifdef(`TARGET_ARCH', | |
198 | After=rc-local.service | |
199 | )m4_dnl | |
440d1d13 BZ |
200 | diff --git a/units/getty@.service.m4 b/units/getty@.service.m4 |
201 | index d2a145d..cae4ae5 100644 | |
202 | --- a/units/getty@.service.m4 | |
203 | +++ b/units/getty@.service.m4 | |
204 | @@ -12,6 +12,9 @@ After=dev-%i.device systemd-user-sessions.service plymouth-quit-wait.service | |
4d29e184 BZ |
205 | m4_ifdef(`TARGET_FEDORA', |
206 | After=rc-local.service | |
207 | )m4_dnl | |
208 | +m4_ifdef(`TARGET_PLD', | |
209 | +After=rc-local.service | |
210 | +)m4_dnl | |
211 | m4_ifdef(`TARGET_ARCH', | |
212 | After=rc-local.service | |
213 | )m4_dnl | |
082609ad | 214 | diff --git a/units/rescue.service.m4.in b/units/rescue.service.m4.in |
440d1d13 | 215 | index 7dd8a22..5a9c363 100644 |
082609ad JR |
216 | --- a/units/rescue.service.m4.in |
217 | +++ b/units/rescue.service.m4.in | |
440d1d13 BZ |
218 | @@ -22,6 +22,9 @@ ExecStartPre=-/bin/echo 'Welcome to rescue mode. Use "systemctl default" or ^D t |
219 | m4_ifdef(`TARGET_FEDORA', | |
4d29e184 BZ |
220 | `EnvironmentFile=/etc/sysconfig/init |
221 | ExecStart=-/bin/bash -c "exec ${SINGLE}"', | |
222 | +m4_ifdef(`TARGET_PLD', | |
223 | +`EnvironmentFile=/etc/sysconfig/init | |
224 | +ExecStart=-/bin/bash -c "exec ${SINGLE}"', | |
440d1d13 BZ |
225 | m4_ifdef(`TARGET_MANDRIVA', |
226 | `EnvironmentFile=/etc/sysconfig/init | |
227 | ExecStart=-/bin/bash -c "exec ${SINGLE}"', | |
228 | @@ -31,7 +34,7 @@ ExecStart=-/bin/bash -c "exec ${SINGLE}"', | |
4d29e184 BZ |
229 | m4_ifdef(`TARGET_MEEGO', |
230 | `EnvironmentFile=/etc/sysconfig/init | |
231 | ExecStart=-/bin/bash -c "exec ${SINGLE}"', | |
440d1d13 BZ |
232 | -`ExecStart=-/sbin/sulogin')))) |
233 | +`ExecStart=-/sbin/sulogin'))))) | |
082609ad | 234 | ExecStopPost=-@SYSTEMCTL@ --fail --no-block default |
4d29e184 BZ |
235 | StandardInput=tty-force |
236 | StandardOutput=inherit | |
440d1d13 BZ |
237 | diff --git a/units/serial-getty@.service.m4 b/units/serial-getty@.service.m4 |
238 | index e5f0ca6..69b7fc2 100644 | |
239 | --- a/units/serial-getty@.service.m4 | |
240 | +++ b/units/serial-getty@.service.m4 | |
241 | @@ -12,6 +12,9 @@ After=dev-%i.device systemd-user-sessions.service plymouth-quit-wait.service | |
4d29e184 BZ |
242 | m4_ifdef(`TARGET_FEDORA', |
243 | After=rc-local.service | |
244 | )m4_dnl | |
245 | +m4_ifdef(`TARGET_PLD', | |
246 | +After=rc-local.service | |
247 | +)m4_dnl | |
248 | m4_ifdef(`TARGET_ARCH', | |
249 | After=rc-local.service | |
250 | )m4_dnl | |
082609ad | 251 | diff --git a/src/rc-local-generator/rc-local-generator.c b/src/rc-local-generator/rc-local-generator.c |
440d1d13 | 252 | index ac6424a..a247c25 100644 |
082609ad JR |
253 | --- a/src/rc-local-generator/rc-local-generator.c |
254 | +++ b/src/rc-local-generator/rc-local-generator.c | |
440d1d13 | 255 | @@ -27,7 +27,7 @@ |
440d1d13 | 256 | #include "util.h" |
082609ad | 257 | #include "mkdir.h" |
440d1d13 BZ |
258 | |
259 | -#if defined(TARGET_FEDORA) || defined(TARGET_MANDRIVA) || defined(TARGET_MAGEIA) | |
260 | +#if defined(TARGET_FEDORA) || defined(TARGET_PLD) || defined(TARGET_MANDRIVA) || defined(TARGET_MAGEIA) | |
082609ad | 261 | #define SCRIPT_PATH_START "/etc/rc.d/rc.local" |
440d1d13 | 262 | #elif defined(TARGET_SUSE) |
082609ad | 263 | #define SCRIPT_PATH_START "/etc/init.d/boot.local" |
71b99f19 JR |
264 | --- /dev/null |
265 | +++ b/units/pld/halt-local.service | |
266 | @@ -0,0 +1,20 @@ | |
267 | +# This file is part of systemd. | |
268 | +# | |
269 | +# systemd is free software; you can redistribute it and/or modify it | |
270 | +# under the terms of the GNU General Public License as published by | |
271 | +# the Free Software Foundation; either version 2 of the License, or | |
272 | +# (at your option) any later version. | |
273 | + | |
274 | +[Unit] | |
275 | +Description=/sbin/halt.local Compatibility | |
276 | +ConditionFileIsExecutable=/sbin/halt.local | |
277 | +DefaultDependencies=no | |
278 | +After=shutdown.target | |
279 | +Before=final.target | |
280 | + | |
281 | +[Service] | |
282 | +Type=oneshot | |
283 | +ExecStart=/sbin/halt.local | |
284 | +TimeoutSec=0 | |
285 | +StandardOutput=tty | |
286 | +RemainAfterExit=yes | |
287 | --- /dev/null | |
288 | +++ b/units/pld/prefdm.service | |
6e59c49e | 289 | @@ -0,0 +1,20 @@ |
71b99f19 JR |
290 | +# This file is part of systemd. |
291 | +# | |
292 | +# systemd is free software; you can redistribute it and/or modify it | |
293 | +# under the terms of the GNU General Public License as published by | |
294 | +# the Free Software Foundation; either version 2 of the License, or | |
295 | +# (at your option) any later version. | |
296 | + | |
297 | +[Unit] | |
298 | +Description=Display Manager | |
e7f63db0 | 299 | +After=livesys-late.service rc-local.service systemd-user-sessions.service acpid.service |
71b99f19 JR |
300 | + |
301 | +# Do not stop plymouth, it is done in prefdm if required | |
302 | +Conflicts=plymouth-quit.service | |
303 | +After=plymouth-quit.service | |
304 | + | |
305 | +[Service] | |
306 | +ExecStart=/etc/X11/xinit/prefdm -nodaemon | |
307 | +Restart=always | |
308 | +RestartSec=0 | |
309 | +IgnoreSIGPIPE=no |