mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-07-29 16:07:14 +00:00
Update lxc-debian.in
fix "bash: warning: setlocale: LC_ALL: cannot change locale" Signed-off-by: <feng xiahou xiahoufeng@yahoo.com> Acked-by: Stéphane Graber <stgraber@ubuntu.com>
This commit is contained in:
parent
1e2eb3f4e6
commit
0f541e3313
@ -97,12 +97,18 @@ EOF
|
|||||||
|
|
||||||
# reconfigure some services
|
# reconfigure some services
|
||||||
if [ -z "$LANG" ]; then
|
if [ -z "$LANG" ]; then
|
||||||
|
cat >> $rootfs/etc/locale.gen << EOF
|
||||||
|
en_US.UTF-8 UTF-8
|
||||||
|
EOF
|
||||||
chroot $rootfs locale-gen en_US.UTF-8 UTF-8
|
chroot $rootfs locale-gen en_US.UTF-8 UTF-8
|
||||||
chroot $rootfs update-locale LANG=en_US.UTF-8
|
chroot $rootfs update-locale LANG=en_US.UTF-8
|
||||||
else
|
else
|
||||||
encoding=$(echo $LANG | cut -d. -f2)
|
encoding=$(echo $LANG | cut -d. -f2)
|
||||||
chroot $rootfs sed -e "s/^# \(${LANG} ${encoding}\)/\1/" \
|
chroot $rootfs sed -e "s/^# \(${LANG} ${encoding}\)/\1/" \
|
||||||
-i /etc/locale.gen 2> /dev/null
|
-i /etc/locale.gen 2> /dev/null
|
||||||
|
cat >> $rootfs/etc/locale.gen << EOF
|
||||||
|
$LANG $encoding
|
||||||
|
EOF
|
||||||
chroot $rootfs locale-gen $LANG $encoding
|
chroot $rootfs locale-gen $LANG $encoding
|
||||||
chroot $rootfs update-locale LANG=$LANG
|
chroot $rootfs update-locale LANG=$LANG
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user