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-240/src/basic/hostname-util.c.orig 2018-12-21 19:53:33.000000000 +0100
12 +++ systemd-240/src/basic/hostname-util.c 2019-01-13 11:11:40.715590524 +0100
16 #include "alloc-util.h"
17 +#include "env-file.h"
20 #include "hostname-util.h"
21 @@ -290,13 +290,33 @@ int read_etc_hostname_stream(FILE *f, ch
25 +int read_etc_hostname_distro(const char *path, char **ret) {
28 + r = parse_env_file(NULL, "/etc/sysconfig/network", NEWLINE, "HOSTNAME", &p, NULL);
31 + if (r == 0) /* EOF without any hostname? the file is empty, let's treat that exactly like no file at all: ENOENT */
33 + hostname_cleanup(p);
34 + if (!hostname_is_valid(p, true))
40 int read_etc_hostname(const char *path, char **ret) {
41 _cleanup_fclose_ FILE *f = NULL;
48 path = "/etc/hostname";
49 + r = read_etc_hostname_distro(path, ret);
54 f = fopen(path, "re");
56 --- systemd-240/src/core/locale-setup.c.orig 2019-01-13 09:27:36.718995151 +0100
57 +++ systemd-240/src/core/locale-setup.c 2019-01-13 09:29:37.548993771 +0100
61 r = proc_cmdline_get_key_many(PROC_CMDLINE_STRIP_RD_PREFIX,
62 + "LANG", &variables[VARIABLE_LANG],
63 "locale.LANG", &variables[VARIABLE_LANG],
64 "locale.LANGUAGE", &variables[VARIABLE_LANGUAGE],
65 "locale.LC_CTYPE", &variables[VARIABLE_LC_CTYPE],
67 log_warning_errno(r, "Failed to read /etc/locale.conf: %m");
71 + (r = parse_env_file(NULL, "/etc/sysconfig/i18n", NEWLINE,
72 + "LANG", &variables[VARIABLE_LANG],
76 + log_warning_errno(r, "Failed to read /etc/sysconfig/i18n: %m");
79 for (i = 0; i < _VARIABLE_LC_MAX; i++) {
82 --- systemd-240/src/basic/time-util.c.orig 2019-01-13 09:27:36.718995151 +0100
83 +++ systemd-240/src/basic/time-util.c 2019-01-13 09:31:12.275659356 +0100
87 #include "alloc-util.h"
88 +#include "env-file.h"
92 @@ -1385,8 +1385,16 @@
93 return r; /* returns EINVAL if not a symlink */
95 e = PATH_STARTSWITH_SET(t, "/usr/share/zoneinfo/", "../usr/share/zoneinfo/");
99 + r = parse_env_file(NULL, "/etc/sysconfig/timezone", NEWLINE,
104 + log_warning_errno(r, "Failed to read /etc/sysconfig/timezone: %m");
109 if (!timezone_is_valid(e, LOG_DEBUG))
111 --- systemd-240.orig/src/vconsole/vconsole-setup.c 2013-08-13 22:02:47.000000000 +0200
112 +++ systemd-240/src/vconsole/vconsole-setup.c 2014-01-09 15:17:49.000000000 +0100
113 @@ -284,6 +284,17 @@ int main(int argc, char **argv) {
114 if (r < 0 && r != -ENOENT)
115 log_warning_errno(r, "Failed to read /etc/vconsole.conf: %m");
118 + int r1 = parse_env_file(NULL, "/etc/sysconfig/console", NEWLINE,
119 + "CONSOLEFONT", &vc_font,
120 + "CONSOLEMAP", &vc_font_map,
121 + "CONSOLESCREENFONTMAP", &vc_font_unimap,
122 + "KEYTABLE", &vc_keymap,
124 + if (r1 < 0 && r1 != -ENOENT)
125 + log_warning_errno(r1, "Failed to read /etc/sysconfig/console: %m");
128 /* Let the kernel command line override /etc/vconsole.conf */
129 if (detect_container(NULL) <= 0) {
130 r = parse_env_file(NULL, "/proc/cmdline", WHITESPACE,