Update the code to also match C.* so that C.UTF-8 doesn't make the
container creation fail.
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
fi
# make sure we have the current locale defined in the container
- if [ -z "$LANG" ]; then
+ 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
else
- if [ "$LANG" != "C" ]; then
- chroot $rootfs locale-gen $LANG
- chroot $rootfs update-locale LANG=$LANG
- fi
+ chroot $rootfs locale-gen $LANG
+ chroot $rootfs update-locale LANG=$LANG
fi
# generate new SSH keys