1
0
mirror of synced 2026-01-11 23:42:56 +00:00
xen-tools.xen-tools/hooks/debian/95-configure-locales

47 lines
667 B
Bash
Executable File

#!/bin/sh
#
# This script ensures the new image has locales setup correctly.
#
# Steve
# --
# https://steve.fi/
prefix=$1
#
# Source our common functions
#
if [ -e /usr/share/xen-tools/common.sh ]; then
. /usr/share/xen-tools/common.sh
else
. ./hooks/common.sh
fi
#
# Log our start
#
logMessage Script $0 starting
#
# Default to the same locale as the host.
#
if [ -e /etc/locale.gen ]; then
cp /etc/locale.gen ${prefix}/etc
fi
#
# Install the package
#
installDebianPackage ${prefix} locales
installDebianPackage ${prefix} util-linux-locales
chroot ${prefix} /usr/sbin/update-locale LANG=C
#
# Log our finish
#
logMessage Script $0 finished.