dracut/0213-10i18n-keymap-find.patch
Thomas Renninger ac8b265ef0 Accepting request 402939 from home:favogt:branches:Base:System
(Difference to last SR: Fix theoretical conflict with $MAP)

Add 0213-10i18n-keymap-find.patch:
  - Fix choice of keymap for inclusion (bsc#942896)
  - Refresh 0301-include_sysconfig_language.patch

OBS-URL: https://build.opensuse.org/request/show/402939
OBS-URL: https://build.opensuse.org/package/show/Base:System/dracut?expand=0&rev=260
2016-06-17 14:53:43 +00:00

26 lines
974 B
Diff

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