aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Gianelloni <wolf31o2@gentoo.org>2008-04-24 18:15:34 +0000
committerChris Gianelloni <wolf31o2@gentoo.org>2008-04-24 18:15:34 +0000
commit51c769f243e74f54daf4f1903aa46876f79829b6 (patch)
tree5c4af2b9198138cf46328f4cb522c4e4d2e16a6f
parentChange from using a directory check to a file check. This should fix bug #21... (diff)
downloadgenkernel-51c769f243e74f54daf4f1903aa46876f79829b6.tar.gz
genkernel-51c769f243e74f54daf4f1903aa46876f79829b6.tar.bz2
genkernel-51c769f243e74f54daf4f1903aa46876f79829b6.zip
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
-rw-r--r--ChangeLog7
-rw-r--r--gen_determineargs.sh4
-rwxr-xr-xgen_funcs.sh4
-rw-r--r--generic/initrd.scripts97
-rw-r--r--generic/linuxrc3
5 files changed, 66 insertions, 49 deletions
diff --git a/ChangeLog b/ChangeLog
index ea94771e..3fd00a5c 100644
--- 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
diff --git a/gen_determineargs.sh b/gen_determineargs.sh
index e34b7410..f125f61b 100644
--- a/gen_determineargs.sh
+++ b/gen_determineargs.sh
@@ -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}"`
diff --git a/gen_funcs.sh b/gen_funcs.sh
index 39427401..30f4b81f 100755
--- a/gen_funcs.sh
+++ b/gen_funcs.sh
@@ -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."
diff --git a/generic/initrd.scripts b/generic/initrd.scripts
index 0e92ea9b..04d02340 100644
--- a/generic/initrd.scripts
+++ b/generic/initrd.scripts
@@ -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"
diff --git a/generic/linuxrc b/generic/linuxrc
index 226f4c66..c53a89e8 100644
--- a/generic/linuxrc
+++ b/generic/linuxrc
@@ -180,6 +180,9 @@ do
real_rootflags\=*)
REAL_ROOTFLAGS=`parse_opt "${x}"`
;;
+ keymap\=*)
+ keymap=`parse_opt "${x}"`
+ ;;
esac
done