]> git.pld-linux.org Git - packages/systemd.git/blob - target-pld.patch
- rel 0.6
[packages/systemd.git] / target-pld.patch
1 --- systemd-37/configure.ac.orig        2011-10-11 20:46:33.000000000 +0200
2 +++ systemd-37/configure.ac     2011-11-26 15:07:34.443334839 +0100
3 @@ -361,6 +361,7 @@
4                  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)])
5          else
6                  test -f "/etc/redhat-release" && with_distro="fedora"
7 +                test -f "/etc/pld-release" && with_distro="pld"
8                  test -f "/etc/SuSE-release" && with_distro="suse"
9                  test -f "/etc/debian_version" &&  with_distro="debian"
10                  test -f "/etc/arch-release" && with_distro="arch"
11 @@ -369,6 +369,12 @@ case $with_distro in
12                  M4_DISTRO_FLAG=-DTARGET_MANDRIVA=1
13                 have_plymouth=true
14                  ;;
15 +        pld)
16 +               SYSTEM_SYSVINIT_PATH=/etc/rc.d/init.d
17 +               SYSTEM_SYSVRCND_PATH=/etc/rc.d
18 +               AC_DEFINE(TARGET_PLD, [], [Target is PLD Linux])
19 +               M4_DISTRO_FLAG=-DTARGET_PLD=1
20 +               ;;
21          meego)
22                  SYSTEM_SYSVINIT_PATH=
23                  SYSTEM_SYSVRCND_PATH=
24 @@ -503,6 +509,7 @@
25  fi
26  
27  AM_CONDITIONAL(TARGET_FEDORA, test x"$with_distro" = xfedora)
28 +AM_CONDITIONAL(TARGET_PLD, test x"$with_distro" = xpld)
29  AM_CONDITIONAL(TARGET_SUSE, test x"$with_distro" = xsuse)
30  AM_CONDITIONAL(TARGET_DEBIAN, test x"$with_distro" = xdebian)
31  AM_CONDITIONAL(TARGET_UBUNTU, test x"$with_distro" = xubuntu)
32 --- systemd-37/Makefile.am.orig 2011-10-11 20:46:33.000000000 +0200
33 +++ systemd-37/Makefile.am      2011-11-26 15:07:34.443334839 +0100
34 @@ -115,6 +115,12 @@
35         -DKBD_SETFONT=\"/usr/bin/setfont\" \
36         -DDEFAULT_FONT=\"LatArCyrHeb-16\"
37  else
38 +if TARGET_PLD
39 +AM_CPPFLAGS += \
40 +       -DKBD_LOADKEYS=\"/usr/bin/loadkeys\" \
41 +       -DKBD_SETFONT=\"/bin/setfont\" \
42 +       -DDEFAULT_FONT=\"LatArCyrHeb-16\"
43 +else
44  AM_CPPFLAGS += \
45         -DKBD_LOADKEYS=\"/bin/loadkeys\" \
46         -DKBD_SETFONT=\"/bin/setfont\" \
47 @@ -125,6 +131,7 @@
48  endif
49  endif
50  endif
51 +endif
52  
53  rootbin_PROGRAMS = \
54         systemd \
55 @@ -1949,6 +1955,23 @@
56         $(MKDIR_P) -m 0755 $(DESTDIR)$(systemunitdir)/final.target.wants
57         ( cd $(DESTDIR)$(systemunitdir)/multi-user.target.wants && \
58                 rm -f rc-local.service && \
59 +               $(LN_S) $(systemunitdir)/rc-local.service rc-local.service )
60 +       ( cd $(DESTDIR)$(systemunitdir)/final.target.wants && \
61 +               rm -f halt-local.service && \
62 +               $(LN_S) $(systemunitdir)/halt-local.service halt-local.service )
63 +       ( cd $(DESTDIR)$(systemunitdir) && \
64 +               rm -f display-manager.service single.service && \
65 +               $(LN_S) prefdm.service display-manager.service && \
66 +               $(LN_S) rescue.service single.service )
67 +       ( cd $(DESTDIR)$(systemunitdir)/graphical.target.wants && \
68 +               rm -f display-manager.service && \
69 +               $(LN_S) $(systemunitdir)/display-manager.service display-manager.service )
70 +endif
71 +
72 +if TARGET_PLD
73 +       $(MKDIR_P) -m 0755 $(DESTDIR)$(systemunitdir)/final.target.wants
74 +       ( cd $(DESTDIR)$(systemunitdir)/multi-user.target.wants && \
75 +               rm -f rc-local.service && \
76                 $(LN_S) $(systemunitdir)/rc-local.service rc-local.service )
77         ( cd $(DESTDIR)$(systemunitdir)/final.target.wants && \
78                 rm -f halt-local.service && \
79 diff -ur systemd-37orig/src/fsck.c systemd-37/src/fsck.c
80 --- systemd-37orig/src/fsck.c   2011-09-23 17:17:15.000000000 +0200
81 +++ systemd-37/src/fsck.c       2011-11-26 15:44:19.573328437 +0100
82 @@ -127,7 +127,7 @@
83                          arg_skip = true;
84                  else if (startswith(w, "fsck.mode"))
85                          log_warning("Invalid fsck.mode= parameter. Ignoring.");
86 -#if defined(TARGET_FEDORA) || defined(TARGET_MANDRIVA)
87 +#if defined(TARGET_FEDORA) || defined(TARGET_PLD) || defined(TARGET_MANDRIVA)
88                  else if (strneq(w, "fastboot", l))
89                          arg_skip = true;
90                  else if (strneq(w, "forcefsck", l))
91 diff -ur systemd-37orig/src/hostname-setup.c systemd-37/src/hostname-setup.c
92 --- systemd-37orig/src/hostname-setup.c 2011-11-26 13:04:04.000000000 +0100
93 +++ systemd-37/src/hostname-setup.c     2011-11-26 15:48:30.890005881 +0100
94 @@ -30,7 +30,7 @@
95  #include "util.h"
96  #include "log.h"
97  
98 -#if defined(TARGET_FEDORA) || defined(TARGET_ALTLINUX) || defined(TARGET_MANDRIVA) || defined(TARGET_MEEGO)
99 +#if defined(TARGET_FEDORA) || defined(TARGET_PLD) || defined(TARGET_ALTLINUX) || defined(TARGET_MANDRIVA) || defined(TARGET_MEEGO)
100  #define FILENAME "/etc/sysconfig/network"
101  #elif defined(TARGET_SUSE) || defined(TARGET_SLACKWARE)
102  #define FILENAME "/etc/HOSTNAME"
103 @@ -64,7 +64,7 @@
104  
105  static int read_distro_hostname(char **hn) {
106  
107 -#if defined(TARGET_FEDORA) || defined(TARGET_ARCH) || defined(TARGET_GENTOO) || defined(TARGET_ALTLINUX) || defined(TARGET_MANDRIVA) || defined(TARGET_MEEGO)
108 +#if defined(TARGET_FEDORA) || defined(TARGET_PLD) || defined(TARGET_ARCH) || defined(TARGET_GENTOO) || defined(TARGET_ALTLINUX) || defined(TARGET_MANDRIVA) || defined(TARGET_MEEGO)
109          int r;
110          FILE *f;
111  
112 diff -ur systemd-37orig/src/locale-setup.c systemd-37/src/locale-setup.c
113 --- systemd-37orig/src/locale-setup.c   2011-09-23 17:16:34.000000000 +0200
114 +++ systemd-37/src/locale-setup.c       2011-11-26 15:47:40.906672674 +0100
115 @@ -74,7 +74,7 @@
116  
117          if (detect_container(NULL) <= 0)
118                  if ((r = parse_env_file("/proc/cmdline", WHITESPACE,
119 -#if defined(TARGET_FEDORA) || defined(TARGET_MEEGO)
120 +#if defined(TARGET_FEDORA) || defined(TARGET_PLD) || defined(TARGET_MEEGO)
121                                          "LANG",                     &variables[VARIABLE_LANG],
122  #endif
123                                          "locale.LANG",              &variables[VARIABLE_LANG],
124 @@ -121,7 +121,7 @@
125                          log_warning("Failed to read /etc/locale.conf: %s", strerror(-r));
126          }
127  
128 -#if defined(TARGET_FEDORA) || defined(TARGET_ALTLINUX) || defined(TARGET_MEEGO)
129 +#if defined(TARGET_FEDORA) || defined(TARGET_PLD) || defined(TARGET_ALTLINUX) || defined(TARGET_MEEGO)
130          if (r <= 0 &&
131              (r = parse_env_file("/etc/sysconfig/i18n", NEWLINE,
132                                  "LANG", &variables[VARIABLE_LANG],
133 diff -ur systemd-37orig/src/systemctl.c systemd-37/src/systemctl.c
134 --- systemd-37orig/src/systemctl.c      2011-10-11 03:17:42.000000000 +0200
135 +++ systemd-37/src/systemctl.c  2011-11-26 15:42:15.089997670 +0100
136 @@ -3443,7 +3443,7 @@
137  static int enable_sysv_units(char **args) {
138          int r = 0;
139  
140 -#if defined (HAVE_SYSV_COMPAT) && (defined(TARGET_FEDORA) || defined(TARGET_MANDRIVA) || defined(TARGET_SUSE) || defined(TARGET_MEEGO) || defined(TARGET_ALTLINUX))
141 +#if defined (HAVE_SYSV_COMPAT) && (defined(TARGET_FEDORA) || defined(TARGET_PLD) || defined(TARGET_MANDRIVA) || defined(TARGET_SUSE) || defined(TARGET_MEEGO) || defined(TARGET_ALTLINUX))
142          const char *verb = args[0];
143          unsigned f = 1, t = 1;
144          LookupPaths paths;
145 diff -ur systemd-37orig/src/timedated.c systemd-37/src/timedated.c
146 --- systemd-37orig/src/timedated.c      2011-10-11 04:22:35.000000000 +0200
147 +++ systemd-37/src/timedated.c  2011-11-26 15:44:03.823326808 +0100
148 @@ -174,7 +174,7 @@
149                  if (r != -ENOENT)
150                          log_warning("Failed to read /etc/timezone: %s", strerror(-r));
151  
152 -#ifdef TARGET_FEDORA
153 +#if defined(TARGET_FEDORA) || defined(TARGET_PLD)
154                  r = parse_env_file("/etc/sysconfig/clock", NEWLINE,
155                                     "ZONE", &zone,
156                                     NULL);
157 diff -ur systemd-37orig/src/util.c systemd-37/src/util.c
158 --- systemd-37orig/src/util.c   2011-10-11 03:17:51.000000000 +0200
159 +++ systemd-37/src/util.c       2011-11-26 15:46:57.579996731 +0100
160 @@ -3599,6 +3599,19 @@
161                          const_color = "0;34"; /* Blue for Fedora */
162          }
163  
164 +#elif defined(TARGET_PLD)
165 +
166 +        if (!pretty_name) {
167 +                if ((r = read_one_line_file("/etc/pld-release", &pretty_name)) < 0) {
168 +
169 +                        if (r != -ENOENT)
170 +                                log_warning("Failed to read /etc/pld-release: %s", strerror(-r));
171 +                }
172 +        }
173 +
174 +        if (!ansi_color)
175 +                const_color = "0;32"; /* Green for PLD */
176 +
177  #elif defined(TARGET_SUSE)
178  
179          if (!pretty_name) {
180 diff -ur systemd-37orig/src/vconsole-setup.c systemd-37/src/vconsole-setup.c
181 --- systemd-37orig/src/vconsole-setup.c 2011-09-28 04:34:17.000000000 +0200
182 +++ systemd-37/src/vconsole-setup.c     2011-11-26 15:42:54.143324363 +0100
183 @@ -230,7 +230,7 @@
184          }
185  
186          if (r <= 0) {
187 -#if defined(TARGET_FEDORA) || defined(TARGET_MEEGO)
188 +#if defined(TARGET_FEDORA) || defined(TARGET_PLD) || defined(TARGET_MEEGO)
189                  if ((r = parse_env_file("/etc/sysconfig/i18n", NEWLINE,
190                                          "SYSFONT", &vc_font,
191                                          "SYSFONTACM", &vc_font_map,
192 diff -ur systemd-37orig/units/console-shell.service.m4 systemd-37/units/console-shell.service.m4
193 --- systemd-37orig/units/console-shell.service.m4       2011-09-21 00:48:26.000000000 +0200
194 +++ systemd-37/units/console-shell.service.m4   2011-11-26 15:49:15.266671820 +0100
195 @@ -11,6 +11,9 @@
196  m4_ifdef(`TARGET_FEDORA',
197  After=rc-local.service
198  )m4_dnl
199 +m4_ifdef(`TARGET_PLD',
200 +After=rc-local.service
201 +)m4_dnl
202  m4_ifdef(`TARGET_ARCH',
203  After=rc-local.service
204  )m4_dnl
205 diff -ur systemd-37orig/units/getty@.service.m4 systemd-37/units/getty@.service.m4
206 --- systemd-37orig/units/getty@.service.m4      2011-08-31 14:33:29.000000000 +0200
207 +++ systemd-37/units/getty@.service.m4  2011-11-26 15:49:07.480001391 +0100
208 @@ -12,6 +12,9 @@
209  m4_ifdef(`TARGET_FEDORA',
210  After=rc-local.service
211  )m4_dnl
212 +m4_ifdef(`TARGET_PLD',
213 +After=rc-local.service
214 +)m4_dnl
215  m4_ifdef(`TARGET_ARCH',
216  After=rc-local.service
217  )m4_dnl
218 diff -ur systemd-37orig/units/rescue.service.m4 systemd-37/units/rescue.service.m4
219 --- systemd-37orig/units/rescue.service.m4      2011-09-23 01:45:34.000000000 +0200
220 +++ systemd-37/units/rescue.service.m4  2011-11-26 15:50:48.323334353 +0100
221 @@ -25,10 +25,13 @@
222  m4_ifdef(`TARGET_MANDRIVA',
223  `EnvironmentFile=/etc/sysconfig/init
224  ExecStart=-/bin/bash -c "exec ${SINGLE}"',
225 +m4_ifdef(`TARGET_PLD',
226 +`EnvironmentFile=/etc/sysconfig/init
227 +ExecStart=-/bin/bash -c "exec ${SINGLE}"',
228  m4_ifdef(`TARGET_MEEGO',
229  `EnvironmentFile=/etc/sysconfig/init
230  ExecStart=-/bin/bash -c "exec ${SINGLE}"',
231 -`ExecStart=-/sbin/sulogin')))
232 +`ExecStart=-/sbin/sulogin'))))
233  ExecStopPost=-/bin/systemctl --fail --no-block default
234  StandardInput=tty-force
235  StandardOutput=inherit
236 diff -ur systemd-37orig/units/serial-getty@.service.m4 systemd-37/units/serial-getty@.service.m4
237 --- systemd-37orig/units/serial-getty@.service.m4       2011-05-18 00:13:05.000000000 +0200
238 +++ systemd-37/units/serial-getty@.service.m4   2011-11-26 15:48:58.076667457 +0100
239 @@ -12,6 +12,9 @@
240  m4_ifdef(`TARGET_FEDORA',
241  After=rc-local.service
242  )m4_dnl
243 +m4_ifdef(`TARGET_PLD',
244 +After=rc-local.service
245 +)m4_dnl
246  m4_ifdef(`TARGET_ARCH',
247  After=rc-local.service
248  )m4_dnl
This page took 0.040455 seconds and 3 git commands to generate.