From 90ccc878deddcb2ec31d9caa0686a666267acafe Mon Sep 17 00:00:00 2001 From: Laurent Vallar Date: Wed, 16 Oct 2013 18:04:15 +0200 Subject: [PATCH] lxc-debian: Force locales generation MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Laurent Vallar Acked-by: Stéphane Graber --- templates/lxc-debian.in | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/templates/lxc-debian.in b/templates/lxc-debian.in index 915afa414..d0a16773b 100644 --- a/templates/lxc-debian.in +++ b/templates/lxc-debian.in @@ -80,7 +80,10 @@ EOF chroot $rootfs locale-gen en_US.UTF-8 UTF-8 chroot $rootfs update-locale LANG=en_US.UTF-8 else - chroot $rootfs locale-gen $LANG $(echo $LANG | cut -d. -f2) + encoding=$(echo $LANG | cut -d. -f2) + chroot $rootfs perl -pe "s/^# (${LANG} ${encoding})/\1/" \ + -i /etc/locale.gen 2>/dev/null + chroot $rootfs locale-gen $LANG $encoding chroot $rootfs update-locale LANG=$LANG fi -- 2.47.2