about summary refs log tree commit diff
path: root/dracut/locale.sh
diff options
context:
space:
mode:
Diffstat (limited to 'dracut/locale.sh')
-rw-r--r--dracut/locale.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/dracut/locale.sh b/dracut/locale.sh
index bad138b..d7f5190 100644
--- a/dracut/locale.sh
+++ b/dracut/locale.sh
@@ -14,4 +14,9 @@ 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
+
+if [ -f ${NEWROOT}/etc/vconsole.conf ]; then
+    sed -e "s,^KEYMAP=.*,KEYMAP=$KEYMAP," -i $NEWROOT/etc/vconsole.conf
+elif [ -f ${NEWROOT}/etc/rc.conf ]; then
+    sed -e "s,^KEYMAP=.*,KEYMAP=$KEYMAP," -i $NEWROOT/etc/rc.conf.conf
+fi