]> git.pld-linux.org Git - packages/systemd.git/blob - target-pld.patch
- remove all .al leftovers
[packages/systemd.git] / target-pld.patch
1 diff -dur -x '*~' -x '*.orig' systemd-208.orig/Makefile.am systemd-208/Makefile.am
2 --- systemd-208.orig/Makefile.am        2013-10-02 04:57:09.000000000 +0200
3 +++ systemd-208/Makefile.am     2014-01-09 15:15:41.000000000 +0100
4 @@ -211,6 +211,8 @@
5  TIMERS_TARGET_WANTS =
6  USER_SOCKETS_TARGET_WANTS =
7  USER_BUSNAMES_TARGET_WANTS =
8 +FINAL_TARGET_WANTS =
9 +GRAPHICAL_TARGET_WANTS =
10  
11  SYSTEM_UNIT_ALIASES =
12  USER_UNIT_ALIASES =
13 @@ -230,6 +232,8 @@
14         what="$(SLICES_TARGET_WANTS)" && wants=slices.target && $(add-wants)
15         what="$(USER_SOCKETS_TARGET_WANTS)" && wants=sockets.target && dir=$(userunitdir) && $(add-wants)
16         what="$(USER_BUSNAMES_TARGET_WANTS)" && wants=busnames.target && dir=$(userunitdir) && $(add-wants)
17 +       what="$(FINAL_TARGET_WANTS)" && wants=final.target && dir=$(systemunitdir) && $(add-wants)
18 +       what="$(GRAPHICAL_TARGET_WANTS)" && wants=graphical.target && dir=$(systemunitdir) && $(add-wants)
19  
20  define add-wants
21         [ -z "$$what" ] || ( \
22 @@ -4001,8 +4005,15 @@
23         $(systemdstatedir)
24  
25  MULTI_USER_TARGET_WANTS += \
26 +       rc-local.service \
27         systemd-logind.service
28  
29 +FINAL_TARGET_WANTS += \
30 +       halt-local.service
31 +
32 +GRAPHICAL_TARGET_WANTS += \
33 +       display-manager.service
34 +
35  SYSTEM_UNIT_ALIASES += \
36         systemd-logind.service dbus-org.freedesktop.login1.service
37  
38 @@ -4493,6 +4504,10 @@
39  uninstall-hook: $(UNINSTALL_DATA_HOOKS) $(UNINSTALL_EXEC_HOOKS)
40  
41  install-data-hook: $(INSTALL_DATA_HOOKS)
42 +       ( cd $(DESTDIR)$(systemunitdir) && \
43 +               rm -f display-manager.service single.service && \
44 +               $(LN_S) prefdm.service display-manager.service && \
45 +               $(LN_S) rescue.service single.service )
46  
47  distclean-local: $(DISTCLEAN_LOCAL_HOOKS)
48  
49 diff -dur -x '*~' -x '*.orig' systemd-208.orig/src/core/hostname-setup.c systemd-208/src/core/hostname-setup.c
50 --- systemd-208.orig/src/core/hostname-setup.c  2013-08-13 22:02:46.000000000 +0200
51 +++ systemd-208/src/core/hostname-setup.c       2014-01-09 15:15:41.000000000 +0100
52 @@ -23,6 +23,7 @@
53  
54  #include "alloc-util.h"
55  #include "fileio.h"
56 +#include "fd-util.h"
57  #include "hostname-setup.h"
58  #include "hostname-util.h"
59  #include "log.h"
60 @@ -53,13 +53,84 @@
61          return 0;
62  }
63  
64 +static int read_distro_hostname(char **hn) {
65 +        int r;
66 +        _cleanup_fclose_ FILE *f = NULL;
67 +
68 +        assert(hn);
69 +
70 +        f = fopen("/etc/sysconfig/network", "re");
71 +        if (!f)
72 +                return -errno;
73 +
74 +        for (;;) {
75 +                char line[LINE_MAX];
76 +                char *s, *k;
77 +
78 +                if (!fgets(line, sizeof(line), f)) {
79 +                        if (feof(f))
80 +                                break;
81 +
82 +                        r = -errno;
83 +                        goto finish;
84 +                }
85 +
86 +                s = strstrip(line);
87 +
88 +                if (!startswith_no_case(s, "HOSTNAME="))
89 +                        continue;
90 +
91 +                k = strdup(s+9);
92 +                if (!k) {
93 +                        r = -ENOMEM;
94 +                        goto finish;
95 +                }
96 +
97 +                hostname_cleanup(k);
98 +
99 +                if (isempty(k)) {
100 +                        free(k);
101 +                        r = -ENOENT;
102 +                        goto finish;
103 +                }
104 +
105 +                *hn = k;
106 +                r = 0;
107 +                goto finish;
108 +        }
109 +
110 +        r = -ENOENT;
111 +
112 +finish:
113 +        return r;
114 +}
115 +
116 +static int read_hostname(char **hn) {
117 +        int r;
118 +
119 +        assert(hn);
120 +
121 +        /* First, try to load the generic hostname configuration file,
122 +         * that we support on all distributions */
123 +
124 +        r = read_hostname_config("/etc/hostname", hn);
125 +        if (r < 0) {
126 +                if (r == -ENOENT)
127 +                        return read_distro_hostname(hn);
128 +
129 +                return r;
130 +        }
131 +
132 +        return 0;
133 +}
134 +
135  int hostname_setup(void) {
136          int r;
137          _cleanup_free_ char *b = NULL;
138          const char *hn;
139          bool enoent = false;
140  
141 -        r = read_hostname_config("/etc/hostname", &b);
142 +        r = read_hostname(&b);
143          if (r < 0) {
144                  if (r == -ENOENT)
145                          enoent = true;
146 diff -dur -x '*~' -x '*.orig' systemd-208.orig/src/core/locale-setup.c systemd-208/src/core/locale-setup.c
147 --- systemd-208.orig/src/core/locale-setup.c    2013-10-01 00:17:21.000000000 +0200
148 +++ systemd-208/src/core/locale-setup.c 2014-01-09 15:15:41.000000000 +0100
149 @@ -76,6 +76,7 @@
150  
151          if (detect_container(NULL) <= 0) {
152                  r = parse_env_file("/proc/cmdline", WHITESPACE,
153 +                                   "LANG",                     &variables[VARIABLE_LANG],
154                                     "locale.LANG",              &variables[VARIABLE_LANG],
155                                     "locale.LANGUAGE",          &variables[VARIABLE_LANGUAGE],
156                                     "locale.LC_CTYPE",          &variables[VARIABLE_LC_CTYPE],
157 @@ -120,6 +121,15 @@
158                          log_warning("Failed to read /etc/locale.conf: %s", strerror(-r));
159          }
160  
161 +        if (r <= 0 &&
162 +            (r = parse_env_file("/etc/sysconfig/i18n", NEWLINE,
163 +                                "LANG", &variables[VARIABLE_LANG],
164 +                                NULL)) < 0) {
165 +
166 +                if (r != -ENOENT)
167 +                        log_warning("Failed to read /etc/sysconfig/i18n: %s", strerror(-r));
168 +        }
169 +
170          add = NULL;
171          for (i = 0; i < _VARIABLE_MAX; i++) {
172                  char *s;
173 --- a/src/basic/time-util.c~    2016-11-03 18:16:42.000000000 +0100
174 +++ b/src/basic/time-util.c     2016-11-12 19:54:28.457197174 +0100
175 @@ -1290,8 +1290,16 @@ int get_timezone(char **tz) {
176          e = path_startswith(t, "/usr/share/zoneinfo/");
177          if (!e)
178                  e = path_startswith(t, "../usr/share/zoneinfo/");
179 -        if (!e)
180 -                return -EINVAL;
181 +        if (!e) {
182 +                r = parse_env_file("/etc/sysconfig/timezone", NEWLINE,
183 +                        "TIMEZONE", &e,
184 +                        NULL);
185 +                if (r < 0) {
186 +                        if (r != -ENOENT)
187 +                                log_warning("Failed to read /etc/sysconfig/timezone: %s", strerror(-r));
188 +                        return -EINVAL;
189 +                }
190 +        }
191  
192          if (!timezone_is_valid(e))
193                  return -EINVAL;
194 diff -dur -x '*~' -x '*.orig' systemd-208.orig/src/vconsole/vconsole-setup.c systemd-208/src/vconsole/vconsole-setup.c
195 --- systemd-208.orig/src/vconsole/vconsole-setup.c      2013-08-13 22:02:47.000000000 +0200
196 +++ systemd-208/src/vconsole/vconsole-setup.c   2014-01-09 15:17:49.000000000 +0100
197 @@ -284,6 +284,17 @@ int main(int argc, char **argv) {
198          if (r < 0 && r != -ENOENT)
199                  log_warning("Failed to read /etc/vconsole.conf: %s", strerror(-r));
200  
201 +        if (r <= 0) {
202 +                int r1 = parse_env_file("/etc/sysconfig/console", NEWLINE,
203 +                                "CONSOLEFONT", &vc_font,
204 +                                "CONSOLEMAP", &vc_font_map,
205 +                                "CONSOLESCREENFONTMAP", &vc_font_unimap,
206 +                                "KEYTABLE", &vc_keymap,
207 +                                NULL);
208 +                if (r1 < 0 && r1 != -ENOENT)
209 +                        log_warning("Failed to read /etc/sysconfig/console: %s", strerror(-r1));
210 +        } 
211 +
212          /* Let the kernel command line override /etc/vconsole.conf */
213          if (detect_container(NULL) <= 0) {
214                  r = parse_env_file("/proc/cmdline", WHITESPACE,
This page took 0.070578 seconds and 3 git commands to generate.