]> git.pld-linux.org Git - packages/systemd.git/blob - target-pld.patch
- udev epoch, BR: xz-devel
[packages/systemd.git] / target-pld.patch
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 += \
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\" \
18 @@ -132,6 +138,7 @@ endif
19  endif
20  endif
21  endif
22 +endif
23  
24  rootbin_PROGRAMS = \
25         systemd \
26 @@ -381,6 +388,14 @@
27         systemd-rc-local-generator
28  endif
29  
30 +if TARGET_PLD
31 +dist_systemunit_DATA += \
32 +       units/fedora/rc-local.service \
33 +       units/fedora/halt-local.service
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 && \
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 +
62  if TARGET_MANDRIVA
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
67 --- a/configure.ac
68 +++ b/configure.ac
69 @@ -361,6 +361,7 @@ if test "z$with_distro" = "z"; then
70                  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)])
71          else
72                  test -f "/etc/redhat-release" && with_distro="fedora"
73 +                test -f "/etc/pld-release" && with_distro="pld"
74                  test -f "/etc/SuSE-release" && with_distro="suse"
75                  test -f "/etc/debian_version" &&  with_distro="debian"
76                  test -f "/etc/arch-release" && with_distro="arch"
77 @@ -448,6 +449,12 @@ case $with_distro in
78                  M4_DEFINES=-DTARGET_MANDRIVA=1
79                  have_plymouth=yes
80                  ;;
81 +        pld)
82 +               SYSTEM_SYSVINIT_PATH=/etc/rc.d/init.d
83 +               SYSTEM_SYSVRCND_PATH=/etc/rc.d
84 +               AC_DEFINE(TARGET_PLD, [], [Target is PLD Linux])
85 +               M4_DISTRO_FLAG=-DTARGET_PLD=1
86 +               ;;
87          meego)
88                  SYSTEM_SYSVINIT_PATH=
89                  SYSTEM_SYSVRCND_PATH=
90 @@ -510,6 +517,7 @@ if test -n "$enable_plymouth"; then
91  fi
92  
93  AM_CONDITIONAL(TARGET_FEDORA, test x"$with_distro" = xfedora)
94 +AM_CONDITIONAL(TARGET_PLD, test x"$with_distro" = xpld)
95  AM_CONDITIONAL(TARGET_SUSE, test x"$with_distro" = xsuse)
96  AM_CONDITIONAL(TARGET_DEBIAN, test x"$with_distro" = xdebian)
97  AM_CONDITIONAL(TARGET_UBUNTU, test x"$with_distro" = xubuntu)
98 diff --git a/src/fsck.c b/src/fsck.c
99 index 3477ba1..d32718d 100644
100 --- a/src/fsck.c
101 +++ b/src/fsck.c
102 @@ -127,7 +127,7 @@ static int parse_proc_cmdline(void) {
103                          arg_skip = true;
104                  else if (startswith(w, "fsck.mode"))
105                          log_warning("Invalid fsck.mode= parameter. Ignoring.");
106 -#if defined(TARGET_FEDORA) || defined(TARGET_MANDRIVA) || defined(TARGET_MAGEIA)
107 +#if defined(TARGET_FEDORA) || defined(TARGET_PLD) || defined(TARGET_MANDRIVA) || defined(TARGET_MAGEIA)
108                  else if (strneq(w, "fastboot", l))
109                          arg_skip = true;
110                  else if (strneq(w, "forcefsck", l))
111 diff --git a/src/hostname-setup.c b/src/hostname-setup.c
112 index 2c2f10c..754f0c7 100644
113 --- a/src/hostname-setup.c
114 +++ b/src/hostname-setup.c
115 @@ -30,7 +30,7 @@
116  #include "util.h"
117  #include "log.h"
118  
119 -#if defined(TARGET_FEDORA) || defined(TARGET_ALTLINUX) || defined(TARGET_MANDRIVA) || defined(TARGET_MEEGO) || defined(TARGET_MAGEIA)
120 +#if defined(TARGET_FEDORA) || defined(TARGET_PLD) || defined(TARGET_ALTLINUX) || defined(TARGET_MANDRIVA) || defined(TARGET_MEEGO) || defined(TARGET_MAGEIA)
121  #define FILENAME "/etc/sysconfig/network"
122  #elif defined(TARGET_SUSE) || defined(TARGET_SLACKWARE)
123  #define FILENAME "/etc/HOSTNAME"
124 @@ -64,7 +64,7 @@ static int read_and_strip_hostname(const char *path, char **hn) {
125  
126  static int read_distro_hostname(char **hn) {
127  
128 -#if defined(TARGET_FEDORA) || defined(TARGET_ARCH) || defined(TARGET_GENTOO) || defined(TARGET_ALTLINUX) || defined(TARGET_MANDRIVA) || defined(TARGET_MEEGO) || defined(TARGET_MAGEIA)
129 +#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)
130          int r;
131          FILE *f;
132  
133 diff --git a/src/locale-setup.c b/src/locale-setup.c
134 index 7f692e9..0a45854 100644
135 --- a/src/locale-setup.c
136 +++ b/src/locale-setup.c
137 @@ -74,7 +74,7 @@ int locale_setup(void) {
138  
139          if (detect_container(NULL) <= 0)
140                  if ((r = parse_env_file("/proc/cmdline", WHITESPACE,
141 -#if defined(TARGET_FEDORA) || defined(TARGET_MEEGO)
142 +#if defined(TARGET_FEDORA) || defined(TARGET_PLD) || defined(TARGET_MEEGO)
143                                          "LANG",                     &variables[VARIABLE_LANG],
144  #endif
145                                          "locale.LANG",              &variables[VARIABLE_LANG],
146 @@ -121,7 +121,7 @@ int locale_setup(void) {
147                          log_warning("Failed to read /etc/locale.conf: %s", strerror(-r));
148          }
149  
150 -#if defined(TARGET_FEDORA) || defined(TARGET_ALTLINUX) || defined(TARGET_MEEGO)
151 +#if defined(TARGET_FEDORA) || defined(TARGET_PLD) || defined(TARGET_ALTLINUX) || defined(TARGET_MEEGO)
152          if (r <= 0 &&
153              (r = parse_env_file("/etc/sysconfig/i18n", NEWLINE,
154                                  "LANG", &variables[VARIABLE_LANG],
155 diff --git a/src/systemctl.c b/src/systemctl.c
156 index 298cb4e..cec3974 100644
157 --- a/src/systemctl.c
158 +++ b/src/systemctl.c
159 @@ -3460,7 +3460,7 @@ finish:
160  static int enable_sysv_units(char **args) {
161          int r = 0;
162  
163 -#if defined (HAVE_SYSV_COMPAT) && (defined(TARGET_FEDORA) || defined(TARGET_MANDRIVA) || defined(TARGET_SUSE) || defined(TARGET_MEEGO) || defined(TARGET_ALTLINUX) || defined(TARGET_MAGEIA))
164 +#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))
165          const char *verb = args[0];
166          unsigned f = 1, t = 1;
167          LookupPaths paths;
168 diff --git a/src/timedate/timedated.c b/src/timedate/timedated.c
169 index 16f54b5..758b9df 100644
170 --- a/src/timedate/timedated.c
171 +++ b/src/timedate/timedated.c
172 @@ -174,7 +174,7 @@ static int read_data(void) {
173                  if (r != -ENOENT)
174                          log_warning("Failed to read /etc/timezone: %s", strerror(-r));
175  
176 -#ifdef TARGET_FEDORA
177 +#if defined(TARGET_FEDORA) || defined(TARGET_PLD)
178                  r = parse_env_file("/etc/sysconfig/clock", NEWLINE,
179                                     "ZONE", &zone,
180                                     NULL);
181 diff --git a/src/util.c b/src/util.c
182 index da71e4d..0df1a7d 100644
183 --- a/src/util.c
184 +++ b/src/util.c
185 @@ -3599,6 +3599,19 @@ void status_welcome(void) {
186                          const_color = "0;34"; /* Blue for Fedora */
187          }
188  
189 +#elif defined(TARGET_PLD)
190 +
191 +        if (!pretty_name) {
192 +                if ((r = read_one_line_file("/etc/pld-release", &pretty_name)) < 0) {
193 +
194 +                        if (r != -ENOENT)
195 +                                log_warning("Failed to read /etc/pld-release: %s", strerror(-r));
196 +                }
197 +        }
198 +
199 +        if (!ansi_color)
200 +                const_color = "0;32"; /* Green for PLD */
201 +
202  #elif defined(TARGET_SUSE)
203  
204          if (!pretty_name) {
205 diff --git a/src/vconsole/vconsole-setup.c b/src/vconsole/vconsole-setup.c
206 index 9196789..1d1a916 100644
207 --- a/src/vconsole/vconsole-setup.c
208 +++ b/src/vconsole/vconsole-setup.c
209 @@ -230,7 +230,7 @@ int main(int argc, char **argv) {
210          }
211  
212          if (r <= 0) {
213 -#if defined(TARGET_FEDORA) || defined(TARGET_MEEGO)
214 +#if defined(TARGET_FEDORA) || defined(TARGET_PLD) || defined(TARGET_MEEGO)
215                  if ((r = parse_env_file("/etc/sysconfig/i18n", NEWLINE,
216                                          "SYSFONT", &vc_font,
217                                          "SYSFONTACM", &vc_font_map,
218 diff --git a/units/console-shell.service.m4 b/units/console-shell.service.m4
219 index 02adc84..a9f31fd 100644
220 --- a/units/console-shell.service.m4
221 +++ b/units/console-shell.service.m4
222 @@ -11,6 +11,9 @@ After=systemd-user-sessions.service plymouth-quit-wait.service
223  m4_ifdef(`TARGET_FEDORA',
224  After=rc-local.service
225  )m4_dnl
226 +m4_ifdef(`TARGET_PLD',
227 +After=rc-local.service
228 +)m4_dnl
229  m4_ifdef(`TARGET_ARCH',
230  After=rc-local.service
231  )m4_dnl
232 diff --git a/units/getty@.service.m4 b/units/getty@.service.m4
233 index d2a145d..cae4ae5 100644
234 --- a/units/getty@.service.m4
235 +++ b/units/getty@.service.m4
236 @@ -12,6 +12,9 @@ After=dev-%i.device systemd-user-sessions.service plymouth-quit-wait.service
237  m4_ifdef(`TARGET_FEDORA',
238  After=rc-local.service
239  )m4_dnl
240 +m4_ifdef(`TARGET_PLD',
241 +After=rc-local.service
242 +)m4_dnl
243  m4_ifdef(`TARGET_ARCH',
244  After=rc-local.service
245  )m4_dnl
246 diff --git a/units/rescue.service.m4 b/units/rescue.service.m4
247 index 7dd8a22..5a9c363 100644
248 --- a/units/rescue.service.m4
249 +++ b/units/rescue.service.m4
250 @@ -22,6 +22,9 @@ ExecStartPre=-/bin/echo 'Welcome to rescue mode. Use "systemctl default" or ^D t
251  m4_ifdef(`TARGET_FEDORA',
252  `EnvironmentFile=/etc/sysconfig/init
253  ExecStart=-/bin/bash -c "exec ${SINGLE}"',
254 +m4_ifdef(`TARGET_PLD',
255 +`EnvironmentFile=/etc/sysconfig/init
256 +ExecStart=-/bin/bash -c "exec ${SINGLE}"',
257  m4_ifdef(`TARGET_MANDRIVA',
258  `EnvironmentFile=/etc/sysconfig/init
259  ExecStart=-/bin/bash -c "exec ${SINGLE}"',
260 @@ -31,7 +34,7 @@ ExecStart=-/bin/bash -c "exec ${SINGLE}"',
261  m4_ifdef(`TARGET_MEEGO',
262  `EnvironmentFile=/etc/sysconfig/init
263  ExecStart=-/bin/bash -c "exec ${SINGLE}"',
264 -`ExecStart=-/sbin/sulogin'))))
265 +`ExecStart=-/sbin/sulogin')))))
266  ExecStopPost=-/bin/systemctl --fail --no-block default
267  StandardInput=tty-force
268  StandardOutput=inherit
269 diff --git a/units/serial-getty@.service.m4 b/units/serial-getty@.service.m4
270 index e5f0ca6..69b7fc2 100644
271 --- a/units/serial-getty@.service.m4
272 +++ b/units/serial-getty@.service.m4
273 @@ -12,6 +12,9 @@ After=dev-%i.device systemd-user-sessions.service plymouth-quit-wait.service
274  m4_ifdef(`TARGET_FEDORA',
275  After=rc-local.service
276  )m4_dnl
277 +m4_ifdef(`TARGET_PLD',
278 +After=rc-local.service
279 +)m4_dnl
280  m4_ifdef(`TARGET_ARCH',
281  After=rc-local.service
282  )m4_dnl
283 diff --git a/src/rc-local-generator.c b/src/rc-local-generator.c
284 index ac6424a..a247c25 100644
285 --- a/src/rc-local-generator.c
286 +++ b/src/rc-local-generator.c
287 @@ -27,7 +27,7 @@
288  #include "log.h"
289  #include "util.h"
290  
291 -#if defined(TARGET_FEDORA) || defined(TARGET_MANDRIVA) || defined(TARGET_MAGEIA)
292 +#if defined(TARGET_FEDORA) || defined(TARGET_PLD) || defined(TARGET_MANDRIVA) || defined(TARGET_MAGEIA)
293  #define SCRIPT_PATH "/etc/rc.d/rc.local"
294  #elif defined(TARGET_SUSE)
295  #define SCRIPT_PATH "/etc/init.d/boot.local"
This page took 0.05912 seconds and 3 git commands to generate.