All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Ensure UNICODE keyboard layout is functional in emergency shell
@ 2010-01-08  7:54 Andrey Borzenkov
       [not found] ` <201001081054.55497.arvidjaar-JGs/UdohzUI@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Andrey Borzenkov @ 2010-01-08  7:54 UTC (permalink / raw)
  To: initramfs-u79uwXL29TY76Z2rM5mHXA


[-- Attachment #1.1: Type: text/plain, Size: 242 bytes --]

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

[-- Attachment #1.2: unikbd --]
[-- Type: message/rfc822, Size: 1663 bytes --]

From: Andrey Borzenkov <arvidjaar-JGs/UdohzUI@public.gmane.org>
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.

Signed-off-by: Andrey Borzenkov <arvidjaar-JGs/UdohzUI@public.gmane.org>

---

 modules.d/10redhat-i18n/install |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)


diff --git a/modules.d/10redhat-i18n/install b/modules.d/10redhat-i18n/install
index 9f74cf7..3cdd57d 100755
--- a/modules.d/10redhat-i18n/install
+++ b/modules.d/10redhat-i18n/install
@@ -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

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] Ensure UNICODE keyboard layout is functional in emergency shell
       [not found] ` <201001081054.55497.arvidjaar-JGs/UdohzUI@public.gmane.org>
@ 2010-01-09  8:50   ` Luca Berra
       [not found]     ` <20100109085009.GA29904-hdG+WfPrfN2JmafXlB/IVQ@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Luca Berra @ 2010-01-09  8:50 UTC (permalink / raw)
  To: Andrey Borzenkov; +Cc: initramfs-u79uwXL29TY76Z2rM5mHXA

[-- Attachment #1: Type: text/plain, Size: 380 bytes --]

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

regards,
L.
On Fri, Jan 08, 2010 at 10:54:55AM +0300, Andrey Borzenkov wrote:
>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


[-- Attachment #2: 0001-Ensure-UNICODE-keyboard-layout-is-functional-in-emer.patch --]
[-- Type: text/plain, Size: 1836 bytes --]

From 7b3ff7a66e79534bbf21314a1880a0ec06379bb3 Mon Sep 17 00:00:00 2001
From: Luca Berra <bluca-1WC7Or56Oao@public.gmane.org>
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.

Signed-off-by: Andrey Borzenkov <arvidjaar-JGs/UdohzUI@public.gmane.org>
Signed-off-by: Luca Berra <bluca-1WC7Or56Oao@public.gmane.org>
---
 modules.d/10redhat-i18n/install |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/modules.d/10redhat-i18n/install b/modules.d/10redhat-i18n/install
index 92939a6..e7323a4 100755
--- a/modules.d/10redhat-i18n/install
+++ b/modules.d/10redhat-i18n/install
@@ -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
-- 
1.6.4.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] Ensure UNICODE keyboard layout is functional in emergency shell
       [not found]     ` <20100109085009.GA29904-hdG+WfPrfN2JmafXlB/IVQ@public.gmane.org>
@ 2010-01-18  9:11       ` Harald Hoyer
  0 siblings, 0 replies; 3+ messages in thread
From: Harald Hoyer @ 2010-01-18  9:11 UTC (permalink / raw)
  To: Luca Berra; +Cc: Andrey Borzenkov, initramfs-u79uwXL29TY76Z2rM5mHXA

On 01/09/2010 09:50 AM, Luca Berra wrote:
> this one is rebased against the kbd patch i sent earlier.
>
> regards,
> L.
> On Fri, Jan 08, 2010 at 10:54:55AM +0300, Andrey Borzenkov wrote:
>> 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-01-18  9:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-08  7:54 [PATCH] Ensure UNICODE keyboard layout is functional in emergency shell Andrey Borzenkov
     [not found] ` <201001081054.55497.arvidjaar-JGs/UdohzUI@public.gmane.org>
2010-01-09  8:50   ` Luca Berra
     [not found]     ` <20100109085009.GA29904-hdG+WfPrfN2JmafXlB/IVQ@public.gmane.org>
2010-01-18  9:11       ` Harald Hoyer

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.