about summary refs log tree commit diff
path: root/dracut
diff options
context:
space:
mode:
authorJuan RP <xtraeme@gmail.com>2013-05-21 22:33:11 +0200
committerJuan RP <xtraeme@gmail.com>2013-05-21 22:33:11 +0200
commit92a48c5d2f8f194fecf26cfa778ec92c7be69ccf (patch)
tree6df2af4f2c65d46622fbe357457d1ea4906b2ea1 /dracut
parentd188c1fe71474be40635b6e124c316ab6bed6819 (diff)
downloadhrmpf-92a48c5d2f8f194fecf26cfa778ec92c7be69ccf.tar.gz
hrmpf-92a48c5d2f8f194fecf26cfa778ec92c7be69ccf.tar.xz
hrmpf-92a48c5d2f8f194fecf26cfa778ec92c7be69ccf.zip
dracut/locale.sh: set locale/keymap in newroot config files too.
Diffstat (limited to 'dracut')
-rw-r--r--dracut/locale.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/dracut/locale.sh b/dracut/locale.sh
index 4225218..c56cec0 100644
--- a/dracut/locale.sh
+++ b/dracut/locale.sh
@@ -12,3 +12,12 @@ LOCALE=$(getarg locale.LANG)
 # Create new user and remove password. We'll use autologin by default.
 sed -e "s,^\#\($LOCALE.*\),\1," -i $NEWROOT/etc/default/libc-locales
 chroot $NEWROOT xbps-reconfigure -f glibc-locales >/dev/null 2>&1
+
+# also enable this locale in newroot.
+echo "LANG=$LOCALE" > $NEWROOT/etc/locale.conf
+echo "LC_COLLATE=C" >> $NEWROOT/etc/locale.conf
+
+# set keymap too.
+KEYMAP=$(getarg vconsole.keymap)
+[ -z "$KEYMAP" ] && KEYMAP="us"
+sed -e "s,^KEYMAP=.*,KEYMAP=$KEYMAP," -i $NEWROOT/etc/vconsole.conf