File 0213-Fix-wrong-keymap-inclusion.patch of Package dracut.15766

From 234283235ba52a50b84b396b85ff8cf6e16d80a0 Mon Sep 17 00:00:00 2001
From: Fabian Vogt <fvogt@suse.com>
Date: Fri, 26 Aug 2016 09:44:05 +0200
Subject: [PATCH] Fix wrong keymap inclusion

For MAP=lt, dracut would choose lt.std.map instead of lt.map.

References: bsc#942896
---
 modules.d/10i18n/module-setup.sh | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/modules.d/10i18n/module-setup.sh b/modules.d/10i18n/module-setup.sh
index 4fd0b26..e5bf5eb 100755
--- a/modules.d/10i18n/module-setup.sh
+++ b/modules.d/10i18n/module-setup.sh
@@ -30,8 +30,9 @@ install() {
     # This is from 10redhat-i18n.
     findkeymap () {
         local MAP=$1
+        local MAPNAME=${1%.map*}
         [[ ! -f $MAP ]] && \
-            MAP=$(find ${kbddir}/keymaps -type f -name $MAP -o -name $MAP.\* | head -n1)
+            MAP=$(find ${kbddir}/keymaps -type f -name ${MAPNAME} -o -name ${MAPNAME}.map -o -name ${MAPNAME}.map.\* | head -n1)
         [[ " $KEYMAPS " = *" $MAP "* ]] && return
         KEYMAPS="$KEYMAPS $MAP"
         case $MAP in
-- 
2.6.6

openSUSE Build Service is sponsored by