dracut/0213-10i18n-keymap-find.patch

26 lines
974 B
Diff
Raw Normal View History

From: Fabian Vogt <fvogt@suse.com>
Subject: Fix wrong keymap inclusion
References: bsc#942896
For MAP=lt, dracut would choose lt.std.map instead of lt.map.
---
modules.d/10i18n/module-setup.sh | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
Index: dracut-044/modules.d/10i18n/module-setup.sh
===================================================================
--- dracut-044.orig/modules.d/10i18n/module-setup.sh
+++ dracut-044/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