From 95a621d73a070f2e4d8d6761b4aee69e90c84384 Mon Sep 17 00:00:00 2001 From: Fabio Erculiani Date: Sun, 25 May 2014 09:48:57 +0100 Subject: [PATCH] 00-keymaps.sh: fix keymap boot args detection and setup, respect docs --- defaults/initrd.d/00-keymaps.sh | 23 ++++++++++++----------- defaults/initrd.d/00-modules.sh | 3 --- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/defaults/initrd.d/00-keymaps.sh b/defaults/initrd.d/00-keymaps.sh index 3455d9e..ea682dd 100755 --- a/defaults/initrd.d/00-keymaps.sh +++ b/defaults/initrd.d/00-keymaps.sh @@ -15,11 +15,13 @@ setup_keymap() { } choose_keymap() { - good_msg "Loading keymaps" + good_msg "Loading keyboard mappings" - splashcmd verbose - cat /lib/keymaps/keymapList - read -t 10 -p '<< Load keymap (Enter for default): ' keymap + if [ -n "${DO_keymap}" ]; then + splashcmd verbose + cat /lib/keymaps/keymapList + read -t 10 -p '<< Load keymap (Enter for default): ' USE_KEYMAP + fi case ${USE_KEYMAP} in 1|azerty) USE_KEYMAP=azerty ;; @@ -68,16 +70,15 @@ choose_keymap() { esac if [ -e "/lib/keymaps/${USE_KEYMAP}.map" ]; then - good_msg "Loading the ''${USE_KEYMAP}'' keymap" + good_msg "Loading the ''${USE_KEYMAP}'' keyboard mapping" loadkmap < "/lib/keymaps/${USE_KEYMAP}.map" - splashcmd set_msg "Set keymap to ${USE_KEYMAP}" + splashcmd set_msg "Set keyboard mapping to ${USE_KEYMAP}" elif [ -z "${USE_KEYMAP}" ]; then - good_msg - good_msg "Keeping default keymap" - splashcmd set_msg "Keeping default keymap" + good_msg "Keeping default keyboard mapping" + splashcmd set_msg "Keeping default keyboard mapping" else - bad_msg "Sorry, but keymap ${USE_KEYMAP} is invalid" - unset keymap + bad_msg "Sorry, but keyboard mapping ${USE_KEYMAP} is invalid" + unset USE_KEYMAP choose_keymap fi } diff --git a/defaults/initrd.d/00-modules.sh b/defaults/initrd.d/00-modules.sh index 6dc3e73..e8aaf3a 100755 --- a/defaults/initrd.d/00-modules.sh +++ b/defaults/initrd.d/00-modules.sh @@ -80,9 +80,6 @@ cmdline_hwopts() { elif [ "${y}" = "no${x}" ]; then MY_HWOPTS="$(echo ${MY_HWOPTS} | sed -e \"s/${x}//g\" -)" fi - if [ "$(echo ${y} | cut -b -7)" = "keymap=" ]; then - MY_HWOPTS="${MY_HWOPTS} keymap" - fi done done