From edf6d563810e2c5807c6bc8bf300b1a6393ee7d1 Mon Sep 17 00:00:00 2001 From: steve Date: Wed, 23 May 2007 16:20:39 +0000 Subject: [PATCH] 2007-05-23 16:20:39 by steve Install locales for Debian-systems. Closes: #423385 --- debian/changelog | 2 ++ hooks/debian/95-configure-locales | 51 +++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100755 hooks/debian/95-configure-locales diff --git a/debian/changelog b/debian/changelog index b6efbab..7951a10 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,8 @@ * New upstream release v3.4 - Allows the expansion of backticks in configuration file(s). + - Generate locales for the new Xen guests to match the host machine. + (Closes: #423385) xen-tools (3.3-1) unstable; urgency=low diff --git a/hooks/debian/95-configure-locales b/hooks/debian/95-configure-locales new file mode 100755 index 0000000..b45553c --- /dev/null +++ b/hooks/debian/95-configure-locales @@ -0,0 +1,51 @@ +#!/bin/sh +# +# This script ensures the new image has locales setup correctly. +# +# Steve +# -- +# http://www.steve.org.uk/ + +prefix=$1 + + +# +# Source our common functions +# +if [ -e /usr/lib/xen-tools/common.sh ]; then + . /usr/lib/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 + +# +# Now generate the actual locale files. +# +chroot ${prefix} /usr/sbin/locale-gen + + + +# +# Log our finish +# +logMessage Script $0 finished. \ No newline at end of file