ubuntu: Don't break when the locale is C.*

Update the code to also match C.* so that C.UTF-8 doesn't make the container creation fail. Signed-off-by: 's avatarStéphane Graber <stgraber@ubuntu.com> Acked-by: 's avatarSerge E. Hallyn <serge.hallyn@ubuntu.com>
parent 0a9362f5
......@@ -81,14 +81,12 @@ EOF
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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment