[lxc-devel] [PATCH] ubuntu: Don't fail on invalid locale

Serge Hallyn serge.hallyn at ubuntu.com
Thu Jan 16 04:36:31 UTC 2014


Quoting Stéphane Graber (stgraber at ubuntu.com):
> Signed-off-by: Stéphane Graber <stgraber at ubuntu.com>

Acked-by: Serge E. Hallyn <serge.hallyn at ubuntu.com>

> ---
>  templates/lxc-ubuntu.in | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/templates/lxc-ubuntu.in b/templates/lxc-ubuntu.in
> index d9bb8a4..74d6eb4 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
> -- 
> 1.8.5.2
> 
> _______________________________________________
> lxc-devel mailing list
> lxc-devel at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-devel


More information about the lxc-devel mailing list