From 1d3e3901c79f87d4e539c7e95a004f52cc30e5c7 Mon Sep 17 00:00:00 2001 From: Laurent Vallar Date: Thu, 13 Feb 2014 09:56:36 +0100 Subject: [PATCH] Support current LANG environment variable if any. Signed-off-by: Laurent Vallar --- boxes/build-debian-box.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/boxes/build-debian-box.sh b/boxes/build-debian-box.sh index 97bff87..60a9007 100755 --- a/boxes/build-debian-box.sh +++ b/boxes/build-debian-box.sh @@ -74,9 +74,10 @@ chroot $ROOTFS /usr/sbin/update-rc.d -f mountall-bootclean.sh remove chroot $ROOTFS /usr/sbin/update-rc.d -f mountnfs-bootclean.sh remove # Ensure locales are properly set, based on http://linux.livejournal.com/1880366.html -sed -i "s/^# en_US/en_US/" ${ROOTFS}/etc/locale.gen +LANG=${LANG:-en_US.UTF-8} +sed -i "s/^# ${LANG}/${LANG}/" ${ROOTFS}/etc/locale.gen chroot $ROOTFS /usr/sbin/locale-gen -chroot $ROOTFS update-locale LANG=en_US.UTF-8 +chroot $ROOTFS update-locale LANG=${LANG} ##################################################################################