systemd/handle-root-uses-lang.patch
Robert Milasan 626d8c1aa6 - Add fix-devname-prefix.patch: fix modules.devname path, it isn't
in /usr.
- Move post script to fix symlinks in /etc/systemd/system to a
  trigger to run it after old systemd is uninstalled.

- Add fix-debugshell.patch: use /bin/bash if sushell isn't
  installed (bnc#789052).
- Add handle-root-uses-lang.patch: handle ROOT_USES_LANG=ctype
  (bnc#792182).
- Ensure libudev1 and libudev-mini1 conflicts.

OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=317
2012-12-05 18:07:07 +00:00

49 lines
1.7 KiB
Diff

Index: systemd-195/src/core/locale-setup.c
===================================================================
--- systemd-195.orig/src/core/locale-setup.c
+++ systemd-195/src/core/locale-setup.c
@@ -69,6 +69,11 @@ static const char * const variable_names
int locale_setup(void) {
char *variables[_VARIABLE_MAX];
int r = 0, i;
+#if defined(TARGET_SUSE)
+ char *root_uses_lang;
+
+ zero(root_uses_lang);
+#endif
zero(variables);
@@ -134,11 +139,21 @@ int locale_setup(void) {
#elif defined(TARGET_SUSE)
if (r <= 0 &&
(r = parse_env_file("/etc/sysconfig/language", NEWLINE,
+ "ROOT_USES_LANG", &root_uses_lang,
"RC_LANG", &variables[VARIABLE_LANG],
NULL)) < 0) {
if (r != -ENOENT)
log_warning("Failed to read /etc/sysconfig/language: %s", strerror(-r));
+ } else {
+ if (!root_uses_lang || root_uses_lang && strcasecmp(root_uses_lang,"yes") != 0) {
+ if (root_uses_lang && strcasecmp(root_uses_lang,"ctype") == 0)
+ variables[VARIABLE_LC_CTYPE]=variables[VARIABLE_LANG];
+ else
+ free(variables[VARIABLE_LANG]);
+
+ variables[VARIABLE_LANG]=strdup("POSIX");
+ }
}
#elif defined(TARGET_DEBIAN) || defined(TARGET_UBUNTU) || defined(TARGET_ANGSTROM)
@@ -247,5 +262,9 @@ finish:
for (i = 0; i < _VARIABLE_MAX; i++)
free(variables[i]);
+#if defined(TARGET_SUSE)
+ free(root_uses_lang);
+#endif
+
return r;
}