Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 24084 - some problems in /etc/init.d/keymaps
Summary: some problems in /etc/init.d/keymaps
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Martin Schlemmer (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-07-07 17:46 UTC by MATSUU Takuto (RETIRED)
Modified: 2003-07-16 16:16 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
rc-scripts-1.4.3.8p1-keymaps.diff (rc-scripts-1.4.3.8p1-keymaps.diff,1.38 KB, patch)
2003-07-07 17:52 UTC, MATSUU Takuto (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description MATSUU Takuto (RETIRED) gentoo-dev 2003-07-07 17:46:27 UTC
Hi.

/etc/init.d/keymaps contains some problems.

1.EXTENDED_KEYMAP should set after KEYMAP for some extended keymaps. (e.g.
/usr/share/keymaps/i386/include/{backspace,ctrl}.map.gz)
2.Default EXTENDED_KEYMAP is windowkeys now. It is not good for non-i386 systems.

thanks.
Comment 1 MATSUU Takuto (RETIRED) gentoo-dev 2003-07-07 17:52:42 UTC
Created attachment 14255 [details, diff]
rc-scripts-1.4.3.8p1-keymaps.diff
Comment 2 Martin Schlemmer (RETIRED) gentoo-dev 2003-07-16 12:38:23 UTC
I changed it to this in CVS:

--------------------------------------------------
Index: ChangeLog
===================================================================
RCS file: /home/cvsroot/gentoo-src/rc-scripts/ChangeLog,v
retrieving revision 1.237
diff -u -r1.237 ChangeLog
--- ChangeLog	16 Jul 2003 19:19:05 -0000	1.237
+++ ChangeLog	16 Jul 2003 19:35:10 -0000
@@ -22,6 +22,9 @@
     Fix /sbin/functions.sh to disable color printing if NOCOLOR is set to
 	"true" in /etc/make.conf, closing bug #24107.
 
+	Fix /etc/init.d/keymaps to be more non-x86 friendly, and also allow
+	more keymaps to be specified in /etc/rc.conf, bug #24084.
+
   15 Jul 2003; Martin Schlemmer <azarah@gentoo.org>:
 
     Add /bin/csh to /etc/shells.
Index: etc/rc.conf
===================================================================
RCS file: /home/cvsroot/gentoo-src/rc-scripts/etc/rc.conf,v
retrieving revision 1.20
diff -u -r1.20 rc.conf
--- etc/rc.conf	27 Apr 2003 18:39:59 -0000	1.20
+++ etc/rc.conf	16 Jul 2003 19:35:10 -0000
@@ -7,9 +7,15 @@
 
 KEYMAP="us"
 
-# The map to load for extended keyboards.  Most users should leave this as is.
+# Should we first load the 'windowkeys' console keymap?  Most x86 users will
+# say "yes" here.  Note that non-x86 users should leave it as "no".
 
-EXTENDED_KEYMAP="windowkeys"
+SET_WINDOWKEYS="no"
+
+# The maps to load for extended keyboards.  Most users will leave this as is.
+
+EXTENDED_KEYMAPS=
+#EXTENDED_KEYMAPS="backspace keypad"
 
 # CONSOLEFONT specifies the default font that you'd like Linux to use on the
 # console.  You can find a good selection of fonts in /usr/share/consolefonts;
Index: init.d/keymaps
===================================================================
RCS file: /home/cvsroot/gentoo-src/rc-scripts/init.d/keymaps,v
retrieving revision 1.16
diff -u -r1.16 keymaps
--- init.d/keymaps	27 Apr 2003 18:39:59 -0000	1.16
+++ init.d/keymaps	16 Jul 2003 19:35:10 -0000
@@ -37,15 +37,18 @@
 	# New kbd support ...
 	if [ -x /bin/loadkeys ]
 	then
-		[ -z "${EXTENDED_KEYMAP}" ] && local EXTENDED_KEYMAP="windowkeys"
+		[ "${SET_WINDOWKEYS}" = "yes" ] && local WINDOWKEYS_KEYMAP="windowkeys"
+		
+		/bin/loadkeys -q ${WINDOWKEYS_KEYMAP} ${KEYMAP} \
+		                 ${EXTENDED_KEYMAPS} >/dev/null
 		
-		/bin/loadkeys -q ${EXTENDED_KEYMAP} ${KEYMAP} >/dev/null
 	# Old console-tools support ...
 	elif [ -x /usr/bin/loadkeys ]
 	then
-		[ -z "${EXTENDED_KEYMAP}" ] && local EXTENDED_KEYMAP="windowkeys.inc"
+		[ "${SET_WINDOWKEYS}" = "yes" ] && local WINDOWKEYS_KEYMAP="windowkeys.inc"
 		
-		/usr/bin/loadkeys -q ${EXTENDED_KEYMAP} ${KEYMAP} >/dev/null
+		/usr/bin/loadkeys -q ${WINDOWKEYS_KEYMAP} ${KEYMAP} \
+		                     ${EXTENDED_KEYMAPS} >/dev/null
 	else
 		eend 1 "loadkeys executable not found"
 		return 1
Comment 3 MATSUU Takuto (RETIRED) gentoo-dev 2003-07-16 16:16:41 UTC
I think "windowkeys" should be also set after KEYMAP. If KEYMAP defines 'keycode 12[567]', "windowkeys" has no effect.