From: Stéphane Graber Date: Thu, 16 Jan 2014 03:29:12 +0000 (-0500) Subject: ubuntu: Don't fail on invalid locale X-Git-Tag: lxc-1.0.0.beta3~112 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3fefd6e6d5bdd38a0e29587896b9b8bb6db6af2e;p=thirdparty%2Flxc.git ubuntu: Don't fail on invalid locale Signed-off-by: Stéphane Graber Acked-by: Serge E. Hallyn --- diff --git a/templates/lxc-ubuntu.in b/templates/lxc-ubuntu.in index d9bb8a45d..74d6eb44a 100644 --- a/templates/lxc-ubuntu.in +++ b/templates/lxc-ubuntu.in @@ -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