From: Daniel Lezcano Date: Mon, 7 Jun 2010 09:33:55 +0000 (+0200) Subject: generate locales on debian X-Git-Tag: lxc-0.7.0~19 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f1fa1a0866f2dc4ff0fc48f58d8a261b21b7d888;p=thirdparty%2Flxc.git generate locales on debian Let's do like the ubuntu template and generate locales automatically. Signed-off-by: Daniel Lezcano --- diff --git a/templates/lxc-debian.in b/templates/lxc-debian.in index 5a6f5532b..e3c888366 100644 --- a/templates/lxc-debian.in +++ b/templates/lxc-debian.in @@ -13,7 +13,7 @@ # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # You should have received a copy of the GNU Lesser General Public @@ -64,7 +64,13 @@ $hostname EOF # reconfigure some services - chroot $rootfs locale-gen en_US.UTF-8 + if [ -z "$LANG" ]; then + 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 + fi # remove pointless services in a container chroot $rootfs /usr/sbin/update-rc.d -f umountfs remove