Package: live-initramfs
Architecture: all
-Depends: ${misc:Depends}, busybox, file, initramfs-tools, sudo, udev, user-setup
+Depends: ${misc:Depends}, busybox, file, initramfs-tools, localechooser-data, sudo, udev, user-setup
Recommends: eject, uuid-runtime, wget
Suggests: genext2fs (>= 1.4.1), squashfs-tools, mtd-tools
Description: Debian Live initramfs hook
+casper (1.130) hardy; urgency=low
+
+ * Handle use of debian-installer/language for locale selection
+ (LP: #213930).
+
+ -- Colin Watson <cjwatson@ubuntu.com> Sat, 12 Apr 2008 00:30:10 +0100
+
casper (1.129) hardy; urgency=low
* Add COPYING file with GPL text (LP: #211923).
export LIVE_MEDIA_TIMEOUT
;;
+ language=*|debian-installer/language=*)
+ language=${x#debian-installer/language=}
+ locale="$(lang2locale "$language")"
+ set_locale="true"
+ ;;
+
locale=*|debian-installer/locale=*)
LOCALE="${ARGUMENT#*=}"
export LOCALE
eval export "${STRING}"="${VALUE}"
}
+
+lang2locale() {
+ langpart="${1%%_*}"
+ if [ "$1" != "C" ]; then
+ # Match the language code with 3rd field in languagelist
+ line=$(grep -v "^#" /root/usr/share/localechooser/languagelist | cut -f3,4,5 -d\; | grep -v ';C$' | grep "^$langpart;")
+ if [ -n "$line" ]; then
+ if [ "$(echo "$line" | grep -c '')" -gt 1 ]; then
+ # More than one match; try matching the
+ # country as well.
+ countrypart="${1#*_}"
+ if [ "$countrypart" = "$1" ]; then
+ countryline="$(echo "$line" | head -n1)"
+ echo "${countryline##*;}"
+ return
+ fi
+ countrypart="${countrypart%%[@.]*}"
+ countryline="$(echo "$line" | grep ";$countrypart;" | head -n1 || true)"
+ if [ "$countryline" ]; then
+ echo "${countryline##*;}"
+ return
+ fi
+ fi
+ echo "${line##*;}"
+ fi
+ else
+ echo "C"
+ fi
+}