1 diff --git a/Makefile.am b/Makefile.am
2 index 170465a..bce467d 100644
5 @@ -115,6 +115,12 @@ AM_CPPFLAGS += \
6 -DKBD_SETFONT=\"/usr/bin/setfont\" \
7 -DDEFAULT_FONT=\"LatArCyrHeb-16\"
11 + -DKBD_LOADKEYS=\"/usr/bin/loadkeys\" \
12 + -DKBD_SETFONT=\"/bin/setfont\" \
13 + -DDEFAULT_FONT=\"LatArCyrHeb-16\"
16 -DKBD_LOADKEYS=\"/bin/loadkeys\" \
17 -DKBD_SETFONT=\"/bin/setfont\" \
18 @@ -132,6 +138,7 @@ endif
27 systemd-rc-local-generator
31 +dist_systemunit_DATA += \
32 + units/pld/prefdm.service \
33 + units/pld/halt-local.service
34 +systemgenerator_PROGRAMS += \
35 + systemd-rc-local-generator
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 )
46 + $(MKDIR_P) -m 0755 $(DESTDIR)$(systemunitdir)/final.target.wants
47 + ( cd $(DESTDIR)$(systemunitdir)/multi-user.target.wants && \
48 + rm -f rc-local.service && \
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 )
63 $(MKDIR_P) -m 0755 $(DESTDIR)$(systemunitdir)/final.target.wants
64 ( cd $(DESTDIR)$(systemunitdir)/final.target.wants && \
65 diff --git a/configure.ac b/configure.ac
66 index 596a32a..f701bfd 100644
69 @@ -448,6 +449,12 @@ case $with_distro in
70 M4_DEFINES=-DTARGET_MANDRIVA=1
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
80 SYSTEM_SYSVRCND_PATH=/etc
81 AC_DEFINE(TARGET_ANGSTROM, [], [Target is Ångström])
82 @@ -510,6 +517,7 @@ if test -n "$enable_plymouth"; then
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)
90 diff --git a/src/fsck/fsck.c b/src/fsck/fsck.c
91 index 3477ba1..d32718d 100644
94 @@ -127,7 +127,7 @@ static int parse_proc_cmdline(void) {
96 else if (startswith(w, "fsck"))
97 log_warning("Invalid fsck parameter. Ignoring.");
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)
100 else if (strneq(w, "fastboot", l))
102 else if (strneq(w, "forcefsck", l))
103 diff --git a/src/core/hostname-setup.c b/src/core/hostname-setup.c
104 index 2c2f10c..754f0c7 100644
105 --- a/src/core/hostname-setup.c
106 +++ b/src/core/hostname-setup.c
111 -#if defined(TARGET_FEDORA) || defined(TARGET_ALTLINUX) || defined(TARGET_MANDRIVA) || defined(TARGET_MAGEIA)
112 +#if defined(TARGET_FEDORA) || defined(TARGET_PLD) || defined(TARGET_ALTLINUX) || defined(TARGET_MANDRIVA) || defined(TARGET_MAGEIA)
113 #define FILENAME "/etc/sysconfig/network"
114 #elif defined(TARGET_SUSE) || defined(TARGET_SLACKWARE)
115 #define FILENAME "/etc/HOSTNAME"
116 @@ -64,7 +64,7 @@ static int read_and_strip_hostname(const char *path, char **hn) {
118 static int read_distro_hostname(char **hn) {
120 -#if defined(TARGET_FEDORA) || defined(TARGET_ARCH) || defined(TARGET_GENTOO) || defined(TARGET_ALTLINUX) || defined(TARGET_MANDRIVA) || 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_MAGEIA)
125 diff --git a/src/core/locale-setup.c b/src/core/locale-setup.c
126 index 7f692e9..0a45854 100644
127 --- a/src/core/locale-setup.c
128 +++ b/src/core/locale-setup.c
129 @@ -74,7 +74,7 @@ int locale_setup(void) {
131 if (detect_container(NULL) <= 0)
132 if ((r = parse_env_file("/proc/cmdline", WHITESPACE,
133 -#if defined(TARGET_FEDORA)
134 +#if defined(TARGET_FEDORA) || defined(TARGET_PLD)
135 "LANG", &variables[VARIABLE_LANG],
137 "locale.LANG", &variables[VARIABLE_LANG],
138 @@ -121,7 +121,7 @@ int locale_setup(void) {
139 log_warning("Failed to read /etc/locale.conf: %s", strerror(-r));
142 -#if defined(TARGET_FEDORA) || defined(TARGET_ALTLINUX)
143 +#if defined(TARGET_FEDORA) || defined(TARGET_PLD) || defined(TARGET_ALTLINUX)
145 (r = parse_env_file("/etc/sysconfig/i18n", NEWLINE,
146 "LANG", &variables[VARIABLE_LANG],
147 diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
148 index 298cb4e..cec3974 100644
149 --- a/src/systemctl/systemctl.c
150 +++ b/src/systemctl/systemctl.c
151 @@ -3460,7 +3460,7 @@ finish:
152 static int enable_sysv_units(char **args) {
155 -#if defined (HAVE_SYSV_COMPAT) && (defined(TARGET_FEDORA) || defined(TARGET_MANDRIVA) || defined(TARGET_SUSE) || 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_ALTLINUX) || defined(TARGET_MAGEIA))
157 const char *verb = args[0];
158 unsigned f = 1, t = 1;
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) {
166 log_warning("Failed to read /etc/timezone: %s", strerror(-r));
168 -#ifdef TARGET_FEDORA
169 +#if defined(TARGET_FEDORA) || defined(TARGET_PLD)
170 r = parse_env_file("/etc/sysconfig/clock", NEWLINE,
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) {
181 -#if defined(TARGET_FEDORA)
182 +#if defined(TARGET_FEDORA) || defined(TARGET_PLD)
183 r = parse_env_file("/etc/sysconfig/i18n", NEWLINE,
185 "SYSFONTACM", &vc_font_map,
186 diff --git a/units/console-shell.service.m4.in b/units/console-shell.service.m4.in
187 index 02adc84..a9f31fd 100644
188 --- a/units/console-shell.service.m4.in
189 +++ b/units/console-shell.service.m4.in
190 @@ -11,6 +11,9 @@ After=systemd-user-sessions.service plymouth-quit-wait.service
191 m4_ifdef(`TARGET_FEDORA',
192 After=rc-local.service
194 +m4_ifdef(`TARGET_PLD',
195 +After=rc-local.service
197 m4_ifdef(`TARGET_ARCH',
198 After=rc-local.service
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
205 m4_ifdef(`TARGET_FEDORA',
206 After=rc-local.service
208 +m4_ifdef(`TARGET_PLD',
209 +After=rc-local.service
211 m4_ifdef(`TARGET_ARCH',
212 After=rc-local.service
214 diff --git a/units/rescue.service.m4.in b/units/rescue.service.m4.in
215 index 7dd8a22..5a9c363 100644
216 --- a/units/rescue.service.m4.in
217 +++ b/units/rescue.service.m4.in
218 @@ -22,6 +22,9 @@ ExecStartPre=-/bin/echo 'Welcome to rescue mode. Use "systemctl default" or ^D t
219 m4_ifdef(`TARGET_FEDORA',
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}"',
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}"',
229 m4_ifdef(`TARGET_MAGEIA',
230 `EnvironmentFile=/etc/sysconfig/init
231 ExecStart=-/bin/bash -c "exec ${SINGLE}"',
232 -`ExecStart=-/sbin/sulogin')))
233 +`ExecStart=-/sbin/sulogin'))))
234 ExecStopPost=-@SYSTEMCTL@ --fail --no-block default
235 StandardInput=tty-force
236 StandardOutput=inherit
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
242 m4_ifdef(`TARGET_FEDORA',
243 After=rc-local.service
245 +m4_ifdef(`TARGET_PLD',
246 +After=rc-local.service
248 m4_ifdef(`TARGET_ARCH',
249 After=rc-local.service
251 diff --git a/src/rc-local-generator/rc-local-generator.c b/src/rc-local-generator/rc-local-generator.c
252 index ac6424a..a247c25 100644
253 --- a/src/rc-local-generator/rc-local-generator.c
254 +++ b/src/rc-local-generator/rc-local-generator.c
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)
261 #define SCRIPT_PATH_START "/etc/rc.d/rc.local"
262 #elif defined(TARGET_SUSE)
263 #define SCRIPT_PATH_START "/etc/init.d/boot.local"
265 +++ b/units/pld/halt-local.service
267 +# This file is part of systemd.
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.
275 +Description=/sbin/halt.local Compatibility
276 +ConditionFileIsExecutable=/sbin/halt.local
277 +DefaultDependencies=no
278 +After=shutdown.target
283 +ExecStart=/sbin/halt.local
288 +++ b/units/pld/prefdm.service
290 +# This file is part of systemd.
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.
298 +Description=Display Manager
299 +After=livesys-late.service rc-local.service systemd-user-sessions.service acpid.service
301 +# Do not stop plymouth, it is done in prefdm if required
302 +Conflicts=plymouth-quit.service
303 +After=plymouth-quit.service
306 +ExecStart=/etc/X11/xinit/prefdm -nodaemon