]> 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>
Thu, 16 Nov 2017 21:44:24 +0000 (16:44 -0500)
Doing that confuses locale generation. lxc-ubuntu does the same check

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

index 394bd4fba37498298363656f4019e809c64b499e..95099e1e9604671a8450d7c8c5202a0fa6463e43 100644 (file)
@@ -99,7 +99,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