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
This commit is contained in:
Cédric Ollivier 2015-04-06 15:23:02 +02:00
parent 7917e7416b
commit 3deb171a7a

View File

@ -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