X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Flocale-setup.c;h=78fa2123f8e23f4edfa124223571430965de95d3;hb=aed5e44d50656fc5b07e47a717cfe57cc08adc0f;hp=cf0d3e556f4b9184289977d0973ceff2cb95e059;hpb=ce8a6aa1a0934d7377b8c7af185149e4627512b6;p=elogind.git diff --git a/src/locale-setup.c b/src/locale-setup.c index cf0d3e556..78fa2123f 100644 --- a/src/locale-setup.c +++ b/src/locale-setup.c @@ -94,7 +94,6 @@ int locale_setup(void) { /* Hmm, nothing set on the kernel cmd line? Then let's * try /etc/locale */ - if (r <= 0 && (r = parse_env_file("/etc/locale", NEWLINE, "LANG", &variables[VARIABLE_LANG], @@ -125,6 +124,27 @@ int locale_setup(void) { if (r != -ENOENT) log_warning("Failed to read /etc/sysconfig/i18n: %s", strerror(-r)); } + +#elif defined(TARGET_SUSE) + if (r <= 0 && + (r = parse_env_file("/etc/sysconfig/language", NEWLINE, + "RC_LANG", &variables[VARIABLE_LANG], + NULL)) < 0) { + + if (r != -ENOENT) + log_warning("Failed to read /etc/sysconfig/language: %s", strerror(-r)); + } + +#elif defined(TARGET_DEBIAN) + if (r <= 0 && + (r = parse_env_file("/etc/default/locale", NEWLINE, + "LANG", &variables[VARIABLE_LANG], + NULL)) < 0) { + + if (r != -ENOENT) + log_warning("Failed to read /etc/default/locale: %s", strerror(-r)); + } + #elif defined(TARGET_ARCH) if (r <= 0 && (r = parse_env_file("/etc/rc.conf", NEWLINE, @@ -134,6 +154,7 @@ int locale_setup(void) { if (r != -ENOENT) log_warning("Failed to read /etc/rc.conf: %s", strerror(-r)); } + #elif defined(TARGET_GENTOO) /* Gentoo's openrc expects locale variables in /etc/env.d/ * These files are later compiled by env-update into shell