]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
lxc-debian: don't write C.* locales to /etc/locale.gen
authorAntonio Terceiro <terceiro@debian.org>
Fri, 27 Oct 2017 19:13:54 +0000 (17:13 -0200)
committerStéphane Graber <stgraber@ubuntu.com>
Mon, 30 Oct 2017 22:06:59 +0000 (18:06 -0400)
Doing that confuses locale generation. lxc-ubuntu does the same check

Signed-off-by: Antonio Terceiro <terceiro@debian.org>
templates/lxc-debian.in

index 8ee0f95b0a1c5df86088dff24d7a8287480aab1f..4b92328f26a8ba0bdd0764dd753d9fdf41598733 100644 (file)
@@ -122,7 +122,7 @@ EOF
     # reconfigure some services
 
     # but first reconfigure locales - so we get no noisy perl-warnings
-    if [ -z "$LANG" ]; then
+    if [ -z "$LANG" ] || echo $LANG | grep -E -q "^C(\..+)*$"; then
         cat >> "$rootfs/etc/locale.gen" << EOF
 en_US.UTF-8 UTF-8
 EOF