Skip to contentSkip to conversation

Ensure UNICODE keyboard layout is functional in emergency shell

PATCH In review Andrey Borzenkov 3 participants 3 messages Jan 8, 2010 – Jan 18, 2010 2 messages not in the archive

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Ensure UNICODE keyboard layout is functional in emergency shell

The attached patch ensures that keyboard in emergency shell more closely corresponds to live system. I am not sure about UNIKEYTABLE which console_init checks as well - if it is not artifact, it can be easily added as well.

-andrey

/lib/udev/cosole_init will load either non-unicode or unicode versions of keyboard layout for the same value of KEYMAP depending on language setting. The simplest solution is to install both versions in initrd; it does not take much space.

While on it, copy some additional maps to ensure emergency shell has the same keyboard layout as full system.

---

 modules.d/10redhat-i18n/install |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)
modules.d/10redhat-i18n/install +9 -1
index 9f74cf7..3cdd57d 100755
@@ -27,12 +27,20 @@ install_local()
             KEYMAP=/etc/sysconfig/console/default.kmap
 	else
             . /etc/sysconfig/keyboard
-            [[ $KEYTABLE && -d /lib/kbd/keymaps ]] && KEYMAP="$KEYTABLE.map"
+	    if [[ $KEYTABLE && -d /lib/kbd/keymaps ]]; then
+		[[ $KEYTABLE =~ *.uni ]] && UNIKEYMAP="$KEYTABLE.map" \
+		    || UNIKEYMAP="$KEYTABLE.uni.map"
+		KEYMAP="$KEYTABLE.map"
+	    fi
 	fi
 	if [[ $KEYMAP ]]; then
             [ -f /etc/sysconfig/keyboard ] && inst /etc/sysconfig/keyboard
             inst loadkeys
             findkeymap $KEYMAP
+            [[ $UNIKEYMAP ]] && findkeymap $UNIKEYMAP
+	    [[ $GRP_TOGGLE ]] && findkeymap $GRP_TOGGLE.map
+	    findkeymap delete.map
+	    findkeymap backspace.map
 
             for FN in $KEYMAPS; do
 		if [ -L $FN ]; then

A message that is not in the archive (sent off-list or not yet received): 201001081054.55497.arvidjaar-JGs/[email protected]

#2 lore raw

this one is rebased against the kbd patch i sent earlier.

regards,
L.

Quoted 3 lines · Andrey Borzenkov

The attached patch ensures that keyboard in emergency shell more closely corresponds to live system. I am not sure about UNIKEYTABLE which console_init checks as well - if it is not artifact, it can be easily added as well.

-andrey

From 7b3ff7a66e79534bbf21314a1880a0ec06379bb3 Mon Sep 17 00:00:00 2001
From: Luca Berra <[email protected]>
Date: Sat, 9 Jan 2010 09:39:22 +0100
Subject: [PATCH] Ensure UNICODE keyboard layout is functional in emergency shell

/lib/udev/cosole_init will load either non-unicode or unicode versions of keyboard layout for the same value of KEYMAP depending on language setting. The simplest solution is to install both versions in initrd; it does not take much space.

While on it, copy some additional maps to ensure emergency shell has the same keyboard layout as full system.

---
 modules.d/10redhat-i18n/install |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)
modules.d/10redhat-i18n/install +9 -1
index 92939a6..e7323a4 100755
@@ -27,12 +27,20 @@ install_local()
             KEYMAP=/etc/sysconfig/console/default.kmap
 	else
             . /etc/sysconfig/keyboard
-            [[ $KEYTABLE && -d ${kbddir}/keymaps ]] && KEYMAP="$KEYTABLE.map"
+	    if [[ $KEYTABLE && -d ${kbddir}/keymaps ]]; then
+		[[ $KEYTABLE =~ *.uni ]] && UNIKEYMAP="$KEYTABLE.map" \
+		    || UNIKEYMAP="$KEYTABLE.uni.map"
+		KEYMAP="$KEYTABLE.map"
+	    fi
 	fi
 	if [[ $KEYMAP ]]; then
             [ -f /etc/sysconfig/keyboard ] && inst /etc/sysconfig/keyboard
             inst loadkeys
             findkeymap $KEYMAP
+            [[ $UNIKEYMAP ]] && findkeymap $UNIKEYMAP
+	    [[ $GRP_TOGGLE ]] && findkeymap $GRP_TOGGLE.map
+	    findkeymap delete.map
+	    findkeymap backspace.map
 
             for FN in $KEYMAPS; do
 		if [ -L $FN ]; then
Signature · 1 line
1.6.4.4

A message that is not in the archive (sent off-list or not yet received): 20100109085009.GA29904-hdG+WfPrfN2JmafXlB/[email protected]

#4 lore raw
Quoted 12 lines · Luca Berra

this one is rebased against the kbd patch i sent earlier.

regards,
L.

Quoted 6 lines · Andrey Borzenkov

The attached patch ensures that keyboard in emergency shell more closely corresponds to live system. I am not sure about UNIKEYTABLE which console_init checks as well - if it is not artifact, it can be easily added as well.

-andrey

pushed