1 ; rest of target-pld.patch logic in systemd.spec
2 --- a/src/basic/hostname-util.h~ 2018-03-05 23:16:37.000000000 +0100
3 +++ b/src/basic/hostname-util.h 2018-05-15 13:46:17.924678801 +0200
4 @@ -42,5 +42,6 @@ int sethostname_idempotent(const char *s
6 int shorten_overlong(const char *s, char **ret);
8 +int read_etc_hostname_distro(const char *path, char **ret);
9 int read_etc_hostname_stream(FILE *f, char **ret);
10 int read_etc_hostname(const char *path, char **ret);
11 --- systemd-238/src/basic/hostname-util.c~ 2018-03-05 23:16:37.000000000 +0100
12 +++ systemd-238/src/basic/hostname-util.c 2018-05-15 13:21:08.392017315 +0200
13 @@ -290,13 +290,33 @@ int read_etc_hostname_stream(FILE *f, ch
17 +int read_etc_hostname_distro(const char *path, char **ret) {
20 + r = parse_env_file("/etc/sysconfig/network", NEWLINE, "HOSTNAME", &p, NULL);
23 + if (r == 0) /* EOF without any hostname? the file is empty, let's treat that exactly like no file at all: ENOENT */
25 + hostname_cleanup(p);
26 + if (!hostname_is_valid(p, true))
32 int read_etc_hostname(const char *path, char **ret) {
33 _cleanup_fclose_ FILE *f = NULL;
40 path = "/etc/hostname";
41 + r = read_etc_hostname_distro(path, ret);
46 f = fopen(path, "re");
48 diff -dur -x '*~' -x '*.orig' systemd-208.orig/src/core/locale-setup.c systemd-208/src/core/locale-setup.c
49 --- systemd-208.orig/src/core/locale-setup.c 2013-10-01 00:17:21.000000000 +0200
50 +++ systemd-208/src/core/locale-setup.c 2014-01-09 15:15:41.000000000 +0100
53 if (detect_container(NULL) <= 0) {
54 r = parse_env_file("/proc/cmdline", WHITESPACE,
55 + "LANG", &variables[VARIABLE_LANG],
56 "locale.LANG", &variables[VARIABLE_LANG],
57 "locale.LANGUAGE", &variables[VARIABLE_LANGUAGE],
58 "locale.LC_CTYPE", &variables[VARIABLE_LC_CTYPE],
60 log_warning("Failed to read /etc/locale.conf: %s", strerror(-r));
64 + (r = parse_env_file("/etc/sysconfig/i18n", NEWLINE,
65 + "LANG", &variables[VARIABLE_LANG],
69 + log_warning("Failed to read /etc/sysconfig/i18n: %s", strerror(-r));
73 for (i = 0; i < _VARIABLE_MAX; i++) {
75 --- a/src/basic/time-util.c~ 2016-11-03 18:16:42.000000000 +0100
76 +++ b/src/basic/time-util.c 2016-11-12 19:54:28.457197174 +0100
77 @@ -1290,8 +1290,16 @@ int get_timezone(char **tz) {
78 e = path_startswith(t, "/usr/share/zoneinfo/");
80 e = path_startswith(t, "../usr/share/zoneinfo/");
84 + r = parse_env_file("/etc/sysconfig/timezone", NEWLINE,
89 + log_warning("Failed to read /etc/sysconfig/timezone: %s", strerror(-r));
94 if (!timezone_is_valid(e))
96 diff -dur -x '*~' -x '*.orig' systemd-208.orig/src/vconsole/vconsole-setup.c systemd-208/src/vconsole/vconsole-setup.c
97 --- systemd-208.orig/src/vconsole/vconsole-setup.c 2013-08-13 22:02:47.000000000 +0200
98 +++ systemd-208/src/vconsole/vconsole-setup.c 2014-01-09 15:17:49.000000000 +0100
99 @@ -284,6 +284,17 @@ int main(int argc, char **argv) {
100 if (r < 0 && r != -ENOENT)
101 log_warning("Failed to read /etc/vconsole.conf: %s", strerror(-r));
104 + int r1 = parse_env_file("/etc/sysconfig/console", NEWLINE,
105 + "CONSOLEFONT", &vc_font,
106 + "CONSOLEMAP", &vc_font_map,
107 + "CONSOLESCREENFONTMAP", &vc_font_unimap,
108 + "KEYTABLE", &vc_keymap,
110 + if (r1 < 0 && r1 != -ENOENT)
111 + log_warning("Failed to read /etc/sysconfig/console: %s", strerror(-r1));
114 /* Let the kernel command line override /etc/vconsole.conf */
115 if (detect_container(NULL) <= 0) {
116 r = parse_env_file("/proc/cmdline", WHITESPACE,