Updated the keymap-handling code so it will be installed and displayed without using...
authorChris Gianelloni <wolf31o2@gentoo.org>
Thu, 24 Apr 2008 18:15:34 +0000 (18:15 +0000)
committerChris Gianelloni <wolf31o2@gentoo.org>
Thu, 24 Apr 2008 18:15:34 +0000 (18:15 +0000)
git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/genkernel/trunk@669 67a159dc-881f-0410-a524-ba9dfbe2cb84

ChangeLog
gen_determineargs.sh
gen_funcs.sh
generic/initrd.scripts
generic/linuxrc

index ea94771ee874a51f97128ac7cb64e3c2c82821d8..3fd00a5c3db7b5aa81077b66e5bdd3cd9c3f21fa 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,13 @@
 # Copyright 2006-2008 Gentoo Foundation; Distributed under the GPL v2
 # $Header: $
 
+  24 Apr 2008; Chris Gianelloni <wolf31o2@gentoo.org> gen_determineargs.sh,
+  gen_funcs.sh, generic/initrd.scripts, generic/linuxrc:
+  Updated the keymap-handling code so it will be installed and displayed
+  without using --do-auto-keymap with a patch from Florian Schilhabel
+  <fernsehleo@gmx.net> for bug #215822. Also, added a keymap= command line
+  option to allow setting keymap from the bootloader, also from Florian.
+
   22 Apr 2008; Chris Gianelloni <wolf31o2@gentoo.org>
   generic/initrd.scripts:
   Change from using a directory check to a file check. This should fix bug
index e34b7410bd2955471bd87925748d2d833f0c79bb..f125f61be1057b840d3248107e1a94ac7b65d333 100644 (file)
@@ -121,8 +121,8 @@ determine_real_args() {
        set_config_with_override 1 KEYMAP               CMD_KEYMAP               "yes"
        set_config_with_override 1 DOKEYMAPAUTO         CMD_DOKEYMAPAUTO
 
-               BOOTDIR=`arch_replace "${BOOTDIR}"`
-               BOOTDIR=${BOOTDIR%/}    # Remove any trailing slash
+       BOOTDIR=`arch_replace "${BOOTDIR}"`
+       BOOTDIR=${BOOTDIR%/}    # Remove any trailing slash
 
        CACHE_DIR=`arch_replace "${CACHE_DIR}"`
        BUSYBOX_BINCACHE=`cache_replace "${BUSYBOX_BINCACHE}"`
index 39427401192f520bde4c71243effd80b2a0649ac..30f4b81fb2f7c4a5091924412aa6b7b159f62e10 100755 (executable)
@@ -486,11 +486,15 @@ set_config_with_override() {
                if [ -n "${!CfgVar}" ]
                then
                        Result=${!CfgVar}
+                       # we need to set the CMD_* according to configfile...
+                       eval ${OverrideVar}=\"${Result}\"
                        print_info 5 "  $CfgVar set in config file to \"${Result}\"."
                else
                        if [ -n "$Default" ]
                        then
                                Result=${Default}
+                               # set OverrideVar to Result, otherwise CMD_* may not be initialized...
+                               eval ${OverrideVar}=\"${Result}\"
                                print_info 5 "  $CfgVar defaulted to \"${Result}\"."
                        else
                                print_info 5 "  $CfgVar not set."
index 0e92ea9b9b7c35e905d8674db2d2b777b3d44f1b..04d02340e5d4e625939f48a41a8ab71e98ca7137 100644 (file)
@@ -521,52 +521,55 @@ setup_keymap() {
 
 chooseKeymap() {
        good_msg "Loading keymaps"
-       cat /lib/keymaps/keymapList
-       read -t 10 -p '<< Load keymap (Enter for default): ' keymap
-       case ${keymap} in
-               1|azerty) keymap=azerty ;;
-               2|be) keymap=be ;;
-               3|bg) keymap=bg ;;
-               4|br-a) keymap=br-a ;;
-               5|br-l) keymap=br-l ;;
-               6|by) keymap=by ;;
-               7|cf) keymap=cf ;;
-               8|croat) keymap=croat ;;
-               9|cz) keymap=cz ;;
-               10|de) keymap=de ;;
-               11|dk) keymap=dk ;;
-               12|dvorak) keymap=dvorak ;;
-               13|es) keymap=es ;;
-               14|et) keymap=et ;;
-               15|fi) keymap=fi ;;
-               16|fr) keymap=fr ;;
-               17|gr) keymap=gr ;;
-               18|hu) keymap=hu ;;
-               19|il) keymap=il ;;
-               20|is) keymap=is ;;
-               21|it) keymap=it ;;
-               22|jp) keymap=jp ;;
-               23|la) keymap=la ;;
-               24|lt) keymap=lt ;;
-               25|mk) keymap=mk ;;
-               26|nl) keymap=nl ;;
-               27|no) keymap=no ;;
-               28|pl) keymap=pl ;;
-               29|pt) keymap=pt ;;
-               30|ro) keymap=ro ;;
-               31|ru) keymap=ru ;;
-               32|se) keymap=se ;;
-               33|sg) keymap=sg ;;
-               34|sk-y) keymap=sk-y ;;
-               35|sk-z) keymap=sk-z ;;
-               36|slovene) keymap=slovene ;;
-               37|trf) keymap=trf ;;
-               38|trq) keymap=trq ;;
-               39|ua) keymap=ua ;;
-               40|uk) keymap=uk ;;
-               41|us) keymap=us ;;
-               42|wangbe) keymap=wangbe ;;
-       esac
+       if [ -z "${keymap}" ]
+       then
+               cat /lib/keymaps/keymapList
+               read -t 10 -p '<< Load keymap (Enter for default): ' keymap
+               case ${keymap} in
+                       1|azerty) keymap=azerty ;;
+                       2|be) keymap=be ;;
+                       3|bg) keymap=bg ;;
+                       4|br-a) keymap=br-a ;;
+                       5|br-l) keymap=br-l ;;
+                       6|by) keymap=by ;;
+                       7|cf) keymap=cf ;;
+                       8|croat) keymap=croat ;;
+                       9|cz) keymap=cz ;;
+                       10|de) keymap=de ;;
+                       11|dk) keymap=dk ;;
+                       12|dvorak) keymap=dvorak ;;
+                       13|es) keymap=es ;;
+                       14|et) keymap=et ;;
+                       15|fi) keymap=fi ;;
+                       16|fr) keymap=fr ;;
+                       17|gr) keymap=gr ;;
+                       18|hu) keymap=hu ;;
+                       19|il) keymap=il ;;
+                       20|is) keymap=is ;;
+                       21|it) keymap=it ;;
+                       22|jp) keymap=jp ;;
+                       23|la) keymap=la ;;
+                       24|lt) keymap=lt ;;
+                       25|mk) keymap=mk ;;
+                       26|nl) keymap=nl ;;
+                       27|no) keymap=no ;;
+                       28|pl) keymap=pl ;;
+                       29|pt) keymap=pt ;;
+                       30|ro) keymap=ro ;;
+                       31|ru) keymap=ru ;;
+                       32|se) keymap=se ;;
+                       33|sg) keymap=sg ;;
+                       34|sk-y) keymap=sk-y ;;
+                       35|sk-z) keymap=sk-z ;;
+                       36|slovene) keymap=slovene ;;
+                       37|trf) keymap=trf ;;
+                       38|trq) keymap=trq ;;
+                       39|ua) keymap=ua ;;
+                       40|uk) keymap=uk ;;
+                       41|us) keymap=us ;;
+                       42|wangbe) keymap=wangbe ;;
+               esac
+       fi
        if [ -e /lib/keymaps/${keymap}.map ]
        then
                good_msg "Loading the ''${keymap}'' keymap"
@@ -580,7 +583,7 @@ chooseKeymap() {
                mkdir -p /etc/sysconfig
 #              echo "XKEYBOARD=${xkeymap}" > /etc/sysconfig/keyboard
                echo "XKEYBOARD=${keymap}" > /etc/sysconfig/keyboard
-       elif [ "$keymap" = '' ]
+       elif [ -z "${keymap}" ]
        then
                echo
                good_msg "Keeping default keymap"
index 226f4c662c4d5bd4ee162bc80c90ebfb123bd13d..c53a89e8b6cd6eeefcede9efe6479990f102b438 100644 (file)
@@ -180,6 +180,9 @@ do
                real_rootflags\=*)
                        REAL_ROOTFLAGS=`parse_opt "${x}"`
                ;;
+               keymap\=*)
+                       keymap=`parse_opt "${x}"`
+               ;;
        esac
 done