diff options
author | Michael Biebl <biebl@debian.org> | 2010-09-27 18:40:51 +0200 |
---|---|---|
committer | Michael Biebl <biebl@debian.org> | 2010-09-27 18:40:51 +0200 |
commit | 7472744bf9eddc7137f03233e49fa780793d5fc0 (patch) | |
tree | b97121a50cea4c64b236f30905a1e78e685cde03 /src/locale-setup.c | |
parent | 858209c51f3c5eadd5489edc3154d84f24e1f00a (diff) |
debian: add locale compat support
Read LANG from /etc/default/locale.
Diffstat (limited to 'src/locale-setup.c')
-rw-r--r-- | src/locale-setup.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/locale-setup.c b/src/locale-setup.c index 2504216559..fcbf216d19 100644 --- a/src/locale-setup.c +++ b/src/locale-setup.c @@ -135,6 +135,16 @@ int locale_setup(void) { log_warning("Failed to read /etc/sysconfig/language: %s", strerror(-r)); } +#ifdef 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, |