1 ; rest of target-pld.patch logic in systemd.spec
2 diff -dur -x '*~' -x '*.orig' systemd-208.orig/src/core/hostname-setup.c systemd-208/src/core/hostname-setup.c
3 --- systemd-208.orig/src/core/hostname-setup.c 2013-08-13 22:02:46.000000000 +0200
4 +++ systemd-208/src/core/hostname-setup.c 2014-01-09 15:15:41.000000000 +0100
7 #include "alloc-util.h"
10 #include "hostname-setup.h"
11 #include "hostname-util.h"
17 +static int read_distro_hostname(char **hn) {
19 + _cleanup_fclose_ FILE *f = NULL;
23 + f = fopen("/etc/sysconfig/network", "re");
28 + char line[LINE_MAX];
31 + if (!fgets(line, sizeof(line), f)) {
41 + if (!startswith_no_case(s, "HOSTNAME="))
50 + hostname_cleanup(k);
69 +static int read_hostname(char **hn) {
74 + /* First, try to load the generic hostname configuration file,
75 + * that we support on all distributions */
77 + r = read_hostname_config("/etc/hostname", hn);
80 + return read_distro_hostname(hn);
88 int hostname_setup(void) {
89 _cleanup_free_ char *b = NULL;
94 - r = read_hostname_config("/etc/hostname", &b);
95 + r = read_hostname(&b);
99 diff -dur -x '*~' -x '*.orig' systemd-208.orig/src/core/locale-setup.c systemd-208/src/core/locale-setup.c
100 --- systemd-208.orig/src/core/locale-setup.c 2013-10-01 00:17:21.000000000 +0200
101 +++ systemd-208/src/core/locale-setup.c 2014-01-09 15:15:41.000000000 +0100
104 if (detect_container(NULL) <= 0) {
105 r = parse_env_file("/proc/cmdline", WHITESPACE,
106 + "LANG", &variables[VARIABLE_LANG],
107 "locale.LANG", &variables[VARIABLE_LANG],
108 "locale.LANGUAGE", &variables[VARIABLE_LANGUAGE],
109 "locale.LC_CTYPE", &variables[VARIABLE_LC_CTYPE],
111 log_warning("Failed to read /etc/locale.conf: %s", strerror(-r));
115 + (r = parse_env_file("/etc/sysconfig/i18n", NEWLINE,
116 + "LANG", &variables[VARIABLE_LANG],
120 + log_warning("Failed to read /etc/sysconfig/i18n: %s", strerror(-r));
124 for (i = 0; i < _VARIABLE_MAX; i++) {
126 --- a/src/basic/time-util.c~ 2016-11-03 18:16:42.000000000 +0100
127 +++ b/src/basic/time-util.c 2016-11-12 19:54:28.457197174 +0100
128 @@ -1290,8 +1290,16 @@ int get_timezone(char **tz) {
129 e = path_startswith(t, "/usr/share/zoneinfo/");
131 e = path_startswith(t, "../usr/share/zoneinfo/");
135 + r = parse_env_file("/etc/sysconfig/timezone", NEWLINE,
140 + log_warning("Failed to read /etc/sysconfig/timezone: %s", strerror(-r));
145 if (!timezone_is_valid(e))
147 diff -dur -x '*~' -x '*.orig' systemd-208.orig/src/vconsole/vconsole-setup.c systemd-208/src/vconsole/vconsole-setup.c
148 --- systemd-208.orig/src/vconsole/vconsole-setup.c 2013-08-13 22:02:47.000000000 +0200
149 +++ systemd-208/src/vconsole/vconsole-setup.c 2014-01-09 15:17:49.000000000 +0100
150 @@ -284,6 +284,17 @@ int main(int argc, char **argv) {
151 if (r < 0 && r != -ENOENT)
152 log_warning("Failed to read /etc/vconsole.conf: %s", strerror(-r));
155 + int r1 = parse_env_file("/etc/sysconfig/console", NEWLINE,
156 + "CONSOLEFONT", &vc_font,
157 + "CONSOLEMAP", &vc_font_map,
158 + "CONSOLESCREENFONTMAP", &vc_font_unimap,
159 + "KEYTABLE", &vc_keymap,
161 + if (r1 < 0 && r1 != -ENOENT)
162 + log_warning("Failed to read /etc/sysconfig/console: %s", strerror(-r1));
165 /* Let the kernel command line override /etc/vconsole.conf */
166 if (detect_container(NULL) <= 0) {
167 r = parse_env_file("/proc/cmdline", WHITESPACE,