]> 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)
committerAntonio Terceiro <terceiro@debian.org>
Sat, 28 Oct 2017 12:11:54 +0000 (10:11 -0200)
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