]> git.proxmox.com Git - mirror_lxc.git/commitdiff
ubuntu: Don't fail on invalid locale
authorStéphane Graber <stgraber@ubuntu.com>
Thu, 16 Jan 2014 03:29:12 +0000 (22:29 -0500)
committerStéphane Graber <stgraber@ubuntu.com>
Thu, 16 Jan 2014 04:48:59 +0000 (23:48 -0500)
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
templates/lxc-ubuntu.in

index d9bb8a45da1ec2dddf91566c0c96df2e1b2b5330..74d6eb44a4e04d696c258d33fb5955e76ccc365c 100644 (file)
@@ -87,11 +87,11 @@ EOF
 
     # make sure we have the current locale defined in the container
     if [ -z "$LANG" ] || echo $LANG | grep -E -q "^C(\..+)*$"; then
-        chroot $rootfs locale-gen en_US.UTF-8
-        chroot $rootfs update-locale LANG=en_US.UTF-8
+        chroot $rootfs locale-gen en_US.UTF-8 || true
+        chroot $rootfs update-locale LANG=en_US.UTF-8 || true
     else
-        chroot $rootfs locale-gen $LANG
-        chroot $rootfs update-locale LANG=$LANG
+        chroot $rootfs locale-gen $LANG || true
+        chroot $rootfs update-locale LANG=$LANG || true
     fi
 
     # generate new SSH keys