From bcc80c316220cc96f13e1e9125cf57730ebf0c19 Mon Sep 17 00:00:00 2001 From: Chris Gianelloni Date: Wed, 27 Dec 2006 19:04:55 +0000 Subject: [PATCH] Added a case statement for the keymap selection to ensure we're always using the named keymaps. This should resolve bug #146714 if everything works correctly. This is 3.4.6, for real. git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/genkernel/trunk@477 67a159dc-881f-0410-a524-ba9dfbe2cb84 --- ChangeLog | 12 +++++++-- gen_bootloader.sh | 2 +- generic/initrd.scripts | 59 +++++++++++++++++++++++++++++++++++++----- 3 files changed, 63 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1e5ce9e..26a15d4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,12 @@ # Copyright 2006-2006 Gentoo Foundation; Distributed under the GPL v2 # $Header: $ + 27 Dec 2006; Chris Gianelloni gen_bootloader.sh, + generic/initrd.scripts: + Added a case statement for the keymap selection to ensure we're always using + the named keymaps. This should resolve bug #146714 if everything works + correctly. This is 3.4.6, for real. + 27 Dec 2006; Chris Gianelloni +generic/keymaps.tar.gz: Adding back the known-good copy of keymaps.tar.gz to svn. @@ -13,9 +19,11 @@ sparc/busy-config, sparc64/busy-config, um/busy-config, x86/busy-config, x86_64/busy-config, xen0/busy-config, xenU/busy-config: Removing generic/keymaps.tar.gz to replace it with a known-good copy. Blame - cvs2svn. + cvs2svn. Also, added patch from Alon Bar-Lev to switch + to using switch_root for 2.6 kernels, and a small typo fix from Michael + Hordijk for bug #158776. - 16 Dec 2006; Chris Gianelloni gen_initrd.sh, + 15 Dec 2006; Chris Gianelloni gen_initrd.sh, generic/linuxrc, genkernel: Added patches from François-Xavier Roure from bug #149020. This will end up being genkernel 3.4.6, most likely. diff --git a/gen_bootloader.sh b/gen_bootloader.sh index a1ec20e..c484b37 100644 --- a/gen_bootloader.sh +++ b/gen_bootloader.sh @@ -79,7 +79,7 @@ EOF local TYPE [ "${KERN_24}" -eq '1' ] && TYPE='rd' || TYPE='ramfs' - cp $GRUB_CONF $GRUB_CONF.bak + cp -f $GRUB_CONF $GRUB_CONF.bak awk 'BEGIN { RS="\n"; } { if(match($0, "kernel-" KNAME "-" ARCH "-" KV)) diff --git a/generic/initrd.scripts b/generic/initrd.scripts index c1234e1..0e19447 100644 --- a/generic/initrd.scripts +++ b/generic/initrd.scripts @@ -465,18 +465,63 @@ 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 [ -e /lib/keymaps/${keymap}.map ] then good_msg "Loading the ''${keymap}'' keymap" loadkmap < /lib/keymaps/${keymap}.map - xkeymap=${keymap} - echo ${keymap} | egrep -e "[0-9]+" >/dev/null 2>&1 - if [ "$?" -eq '0' ] - then - xkeymap=`tail -n 7 /lib/keymaps/keymapList | grep ${keymap} | sed -r "s/.*\s+${keymap}\s+([a-z-]+).*/\1/g" | egrep -v 1` - fi +# xkeymap=${keymap} +# echo ${keymap} | egrep -e "[0-9]+" >/dev/null 2>&1 +# if [ "$?" -eq '0' ] +# then +# xkeymap=`tail -n 7 /lib/keymaps/keymapList | grep ${keymap} | sed -r "s/.*\s+${keymap}\s+([a-z-]+).*/\1/g" | egrep -v 1` +# fi mkdir -p /etc/sysconfig - echo "XKEYBOARD=${xkeymap}" > /etc/sysconfig/keyboard +# echo "XKEYBOARD=${xkeymap}" > /etc/sysconfig/keyboard + echo "XKEYBOARD=${keymap}" > /etc/sysconfig/keyboard elif [ "$keymap" = '' ] then echo -- 2.26.2