debian: add locale compat support
Read LANG from /etc/default/locale.
This commit is contained in:
parent
858209c51f
commit
7472744bf9
|
@ -135,6 +135,16 @@ int locale_setup(void) {
|
||||||
log_warning("Failed to read /etc/sysconfig/language: %s", strerror(-r));
|
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)
|
#elif defined(TARGET_ARCH)
|
||||||
if (r <= 0 &&
|
if (r <= 0 &&
|
||||||
(r = parse_env_file("/etc/rc.conf", NEWLINE,
|
(r = parse_env_file("/etc/rc.conf", NEWLINE,
|
||||||
|
|
Loading…
Reference in New Issue