From 3deb171a7ae6d24bba1c20aed6f847768d156184 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Ollivier?= Date: Mon, 6 Apr 2015 15:23:02 +0200 Subject: [PATCH] Generate the default en_US locale The default locale set by cloud-init is now generated to prevent the warning printed when the user is logged in. Closes-Bug: 1440728 Change-Id: I2faff6c9d3ab8bb5f66d58e77bcf37f186bf501d --- elements/debian/root.d/08-debootstrap | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/elements/debian/root.d/08-debootstrap b/elements/debian/root.d/08-debootstrap index dc128b82..f693adf8 100755 --- a/elements/debian/root.d/08-debootstrap +++ b/elements/debian/root.d/08-debootstrap @@ -105,6 +105,10 @@ auto eth0 iface eth0 inet dhcp EOF + # generate the default en_US locale + sudo sed -i -e "0,/^[# ]*en_US.UTF-8 UTF-8 *$/ s/^[# ]*en_US.UTF-8 UTF-8 *$/en_US.UTF-8 UTF-8/" ${TARGET_ROOT}/etc/locale.gen + sudo chroot ${TARGET_ROOT} dpkg-reconfigure -f noninteractive locales + echo Caching debootstrap result in $DEBOOTSTRAP_TARBALL sudo tar -C $TARGET_ROOT -zcf $DEBOOTSTRAP_TARBALL --exclude='./tmp/*' . fi