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.

git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/genkernel/trunk@669 67a159dc-881f-0410-a524-ba9dfbe2cb84
cleanup-cruft
Chris Gianelloni 17 years ago
parent 0c3ba5d628
commit 51c769f243

@ -2,6 +2,13 @@
# Copyright 2006-2008 Gentoo Foundation; Distributed under the GPL v2 # Copyright 2006-2008 Gentoo Foundation; Distributed under the GPL v2
# $Header: $ # $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> 22 Apr 2008; Chris Gianelloni <wolf31o2@gentoo.org>
generic/initrd.scripts: generic/initrd.scripts:
Change from using a directory check to a file check. This should fix bug Change from using a directory check to a file check. This should fix bug

@ -121,8 +121,8 @@ determine_real_args() {
set_config_with_override 1 KEYMAP CMD_KEYMAP "yes" set_config_with_override 1 KEYMAP CMD_KEYMAP "yes"
set_config_with_override 1 DOKEYMAPAUTO CMD_DOKEYMAPAUTO set_config_with_override 1 DOKEYMAPAUTO CMD_DOKEYMAPAUTO
BOOTDIR=`arch_replace "${BOOTDIR}"` BOOTDIR=`arch_replace "${BOOTDIR}"`
BOOTDIR=${BOOTDIR%/} # Remove any trailing slash BOOTDIR=${BOOTDIR%/} # Remove any trailing slash
CACHE_DIR=`arch_replace "${CACHE_DIR}"` CACHE_DIR=`arch_replace "${CACHE_DIR}"`
BUSYBOX_BINCACHE=`cache_replace "${BUSYBOX_BINCACHE}"` BUSYBOX_BINCACHE=`cache_replace "${BUSYBOX_BINCACHE}"`

@ -486,11 +486,15 @@ set_config_with_override() {
if [ -n "${!CfgVar}" ] if [ -n "${!CfgVar}" ]
then then
Result=${!CfgVar} Result=${!CfgVar}
# we need to set the CMD_* according to configfile...
eval ${OverrideVar}=\"${Result}\"
print_info 5 " $CfgVar set in config file to \"${Result}\"." print_info 5 " $CfgVar set in config file to \"${Result}\"."
else else
if [ -n "$Default" ] if [ -n "$Default" ]
then then
Result=${Default} Result=${Default}
# set OverrideVar to Result, otherwise CMD_* may not be initialized...
eval ${OverrideVar}=\"${Result}\"
print_info 5 " $CfgVar defaulted to \"${Result}\"." print_info 5 " $CfgVar defaulted to \"${Result}\"."
else else
print_info 5 " $CfgVar not set." print_info 5 " $CfgVar not set."

@ -521,52 +521,55 @@ setup_keymap() {
chooseKeymap() { chooseKeymap() {
good_msg "Loading keymaps" good_msg "Loading keymaps"
cat /lib/keymaps/keymapList if [ -z "${keymap}" ]
read -t 10 -p '<< Load keymap (Enter for default): ' keymap then
case ${keymap} in cat /lib/keymaps/keymapList
1|azerty) keymap=azerty ;; read -t 10 -p '<< Load keymap (Enter for default): ' keymap
2|be) keymap=be ;; case ${keymap} in
3|bg) keymap=bg ;; 1|azerty) keymap=azerty ;;
4|br-a) keymap=br-a ;; 2|be) keymap=be ;;
5|br-l) keymap=br-l ;; 3|bg) keymap=bg ;;
6|by) keymap=by ;; 4|br-a) keymap=br-a ;;
7|cf) keymap=cf ;; 5|br-l) keymap=br-l ;;
8|croat) keymap=croat ;; 6|by) keymap=by ;;
9|cz) keymap=cz ;; 7|cf) keymap=cf ;;
10|de) keymap=de ;; 8|croat) keymap=croat ;;
11|dk) keymap=dk ;; 9|cz) keymap=cz ;;
12|dvorak) keymap=dvorak ;; 10|de) keymap=de ;;
13|es) keymap=es ;; 11|dk) keymap=dk ;;
14|et) keymap=et ;; 12|dvorak) keymap=dvorak ;;
15|fi) keymap=fi ;; 13|es) keymap=es ;;
16|fr) keymap=fr ;; 14|et) keymap=et ;;
17|gr) keymap=gr ;; 15|fi) keymap=fi ;;
18|hu) keymap=hu ;; 16|fr) keymap=fr ;;
19|il) keymap=il ;; 17|gr) keymap=gr ;;
20|is) keymap=is ;; 18|hu) keymap=hu ;;
21|it) keymap=it ;; 19|il) keymap=il ;;
22|jp) keymap=jp ;; 20|is) keymap=is ;;
23|la) keymap=la ;; 21|it) keymap=it ;;
24|lt) keymap=lt ;; 22|jp) keymap=jp ;;
25|mk) keymap=mk ;; 23|la) keymap=la ;;
26|nl) keymap=nl ;; 24|lt) keymap=lt ;;
27|no) keymap=no ;; 25|mk) keymap=mk ;;
28|pl) keymap=pl ;; 26|nl) keymap=nl ;;
29|pt) keymap=pt ;; 27|no) keymap=no ;;
30|ro) keymap=ro ;; 28|pl) keymap=pl ;;
31|ru) keymap=ru ;; 29|pt) keymap=pt ;;
32|se) keymap=se ;; 30|ro) keymap=ro ;;
33|sg) keymap=sg ;; 31|ru) keymap=ru ;;
34|sk-y) keymap=sk-y ;; 32|se) keymap=se ;;
35|sk-z) keymap=sk-z ;; 33|sg) keymap=sg ;;
36|slovene) keymap=slovene ;; 34|sk-y) keymap=sk-y ;;
37|trf) keymap=trf ;; 35|sk-z) keymap=sk-z ;;
38|trq) keymap=trq ;; 36|slovene) keymap=slovene ;;
39|ua) keymap=ua ;; 37|trf) keymap=trf ;;
40|uk) keymap=uk ;; 38|trq) keymap=trq ;;
41|us) keymap=us ;; 39|ua) keymap=ua ;;
42|wangbe) keymap=wangbe ;; 40|uk) keymap=uk ;;
esac 41|us) keymap=us ;;
42|wangbe) keymap=wangbe ;;
esac
fi
if [ -e /lib/keymaps/${keymap}.map ] if [ -e /lib/keymaps/${keymap}.map ]
then then
good_msg "Loading the ''${keymap}'' keymap" good_msg "Loading the ''${keymap}'' keymap"
@ -580,7 +583,7 @@ chooseKeymap() {
mkdir -p /etc/sysconfig mkdir -p /etc/sysconfig
# echo "XKEYBOARD=${xkeymap}" > /etc/sysconfig/keyboard # echo "XKEYBOARD=${xkeymap}" > /etc/sysconfig/keyboard
echo "XKEYBOARD=${keymap}" > /etc/sysconfig/keyboard echo "XKEYBOARD=${keymap}" > /etc/sysconfig/keyboard
elif [ "$keymap" = '' ] elif [ -z "${keymap}" ]
then then
echo echo
good_msg "Keeping default keymap" good_msg "Keeping default keymap"

@ -180,6 +180,9 @@ do
real_rootflags\=*) real_rootflags\=*)
REAL_ROOTFLAGS=`parse_opt "${x}"` REAL_ROOTFLAGS=`parse_opt "${x}"`
;; ;;
keymap\=*)
keymap=`parse_opt "${x}"`
;;
esac esac
done done

Loading…
Cancel
Save