[lxc-devel] [PATCH] ubuntu template: fix installation when LANG=C
Dwight Engen
dwight.engen at oracle.com
Wed Apr 3 18:43:15 UTC 2013
The ubuntu template will silently fail (because it is set -e) on
the locale-gen command when LANG=C
Signed-off-by: Dwight Engen <dwight.engen at oracle.com>
---
templates/lxc-ubuntu.in | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/templates/lxc-ubuntu.in b/templates/lxc-ubuntu.in
index f011633..db38af0 100644
--- a/templates/lxc-ubuntu.in
+++ b/templates/lxc-ubuntu.in
@@ -85,8 +85,10 @@ EOF
chroot $rootfs locale-gen en_US.UTF-8
chroot $rootfs update-locale LANG=en_US.UTF-8
else
- chroot $rootfs locale-gen $LANG
- chroot $rootfs update-locale LANG=$LANG
+ if [ "$LANG" != "C" ]; then
+ chroot $rootfs locale-gen $LANG
+ chroot $rootfs update-locale LANG=$LANG
+ fi
fi
return 0
--
1.7.12.3
More information about the lxc-devel
mailing list