]> err.no Git - systemd/commitdiff
debian: add locale compat support
authorMichael Biebl <biebl@debian.org>
Mon, 27 Sep 2010 16:40:51 +0000 (18:40 +0200)
committerMichael Biebl <biebl@debian.org>
Mon, 27 Sep 2010 16:40:51 +0000 (18:40 +0200)
Read LANG from /etc/default/locale.

src/locale-setup.c

index 2504216559c264df4affcbc3f14ff34f67ca49cb..fcbf216d199f67527e19c06d244b5c0b4e12ad3f 100644 (file)
@@ -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,