1 diff --git a/Makefile.am b/Makefile.am
2 index 170465a..bce467d 100644
5 @@ -4083,6 +4083,21 @@ if TARGET_FEDORA
6 $(LN_S) ../systemd-modules-load.service systemd-modules-load.service )
9 + $(MKDIR_P) -m 0755 $(DESTDIR)$(systemunitdir)/final.target.wants
10 + ( cd $(DESTDIR)$(systemunitdir)/multi-user.target.wants && \
11 + rm -f rc-local.service && \
12 + $(LN_S) $(systemunitdir)/rc-local.service rc-local.service )
13 + ( cd $(DESTDIR)$(systemunitdir)/final.target.wants && \
14 + rm -f halt-local.service && \
15 + $(LN_S) $(systemunitdir)/halt-local.service halt-local.service )
16 + ( cd $(DESTDIR)$(systemunitdir) && \
17 + rm -f display-manager.service single.service && \
18 + $(LN_S) prefdm.service display-manager.service && \
19 + $(LN_S) rescue.service single.service )
20 + ( cd $(DESTDIR)$(systemunitdir)/graphical.target.wants && \
21 + rm -f display-manager.service && \
22 + $(LN_S) $(systemunitdir)/display-manager.service display-manager.service )
24 install-exec-hook: $(INSTALL_EXEC_HOOKS)
26 uninstall-hook: $(UNINSTALL_DATA_HOOKS) $(UNINSTALL_EXEC_HOOKS)
27 diff --git a/src/core/hostname-setup.c b/src/core/hostname-setup.c
28 index 2c2f10c..754f0c7 100644
29 --- a/src/core/hostname-setup.c
30 +++ b/src/core/hostname-setup.c
31 @@ -64,13 +64,84 @@ static int read_and_strip_hostname(const char *path, char **hn) {
35 +static int read_distro_hostname(char **hn) {
37 + _cleanup_fclose_ FILE *f = NULL;
41 + f = fopen("/etc/sysconfig/network", "re");
46 + char line[LINE_MAX];
49 + if (!fgets(line, sizeof(line), f)) {
59 + if (!startswith_no_case(s, "HOSTNAME="))
68 + hostname_cleanup(k);
87 +static int read_hostname(char **hn) {
92 + /* First, try to load the generic hostname configuration file,
93 + * that we support on all distributions */
95 + r = read_and_strip_hostname("/etc/hostname", hn);
98 + return read_distro_hostname(hn);
106 int hostname_setup(void) {
108 _cleanup_free_ char *b = NULL;
112 - r = read_and_strip_hostname("/etc/hostname", &b);
113 + r = read_hostname(&b);
117 diff --git a/src/core/locale-setup.c b/src/core/locale-setup.c
118 index 7f692e9..0a45854 100644
119 --- a/src/core/locale-setup.c
120 +++ b/src/core/locale-setup.c
121 @@ -74,6 +74,7 @@ int locale_setup(void) {
123 if (detect_container(NULL) <= 0) {
124 r = parse_env_file("/proc/cmdline", WHITESPACE,
125 + "LANG", &variables[VARIABLE_LANG],
126 "locale.LANG", &variables[VARIABLE_LANG],
127 "locale.LANGUAGE", &variables[VARIABLE_LANGUAGE],
128 "locale.LC_CTYPE", &variables[VARIABLE_LC_CTYPE],
129 @@ -121,6 +121,15 @@ int locale_setup(void) {
130 log_warning("Failed to read /etc/locale.conf: %s", strerror(-r));
134 + (r = parse_env_file("/etc/sysconfig/i18n", NEWLINE,
135 + "LANG", &variables[VARIABLE_LANG],
139 + log_warning("Failed to read /etc/sysconfig/i18n: %s", strerror(-r));
142 if (!variables[VARIABLE_LANG]) {
143 variables[VARIABLE_LANG] = strdup("C");
144 if (!variables[VARIABLE_LANG]) {
145 --- systemd-196/src/timedate/timedated.c~ 2012-10-16 23:35:40.589269718 +0200
146 +++ systemd-196/src/timedate/timedated.c 2012-12-21 11:46:13.545086335 +0100
151 + r = parse_env_file("/etc/sysconfig/timezone", NEWLINE,
152 + "TIMEZONE", &tz.zone,
156 + log_warning("Failed to read /etc/sysconfig/timezone: %s", strerror(-r));
159 r = read_one_line_file("/etc/timezone", &tz.zone);
161 diff --git a/src/vconsole/vconsole-setup.c b/src/vconsole/vconsole-setup.c
162 index 9196789..1d1a916 100644
163 --- a/src/vconsole/vconsole-setup.c
164 +++ b/src/vconsole/vconsole-setup.c
169 + r = parse_env_file("/etc/sysconfig/console", NEWLINE,
170 + "CONSOLEFONT", &vc_font,
171 + "CONSOLEMAP", &vc_font_map,
172 + "CONSOLESCREENFONTMAP", &vc_font_unimap,
173 + "KEYTABLE", &vc_keymap,
175 + if (r < 0 && r != -ENOENT)
176 + log_warning("Failed to read /etc/sysconfig/console: %s", strerror(-r));