File 0172-10i18n-module-setup.sh-For-FONT_MAP-also-check-wheth.patch of Package dracut.244

From a1171097cd53a5d875f42d2965975bc71bf2d3cd Mon Sep 17 00:00:00 2001
From: Julian Wolf <juwolf@suse.de>
Date: Tue, 25 Nov 2014 14:54:33 +0100
Subject: =?UTF-8?q?10i18n/module-setup.sh:=20For=20$FONT=5FMAP=20also=20ch?=
 =?UTF-8?q?eck=20whether=20file=20exists=20without=0A.trans=20ending=20(bn?=
 =?UTF-8?q?c#904533)?=

Signed-off-by: Julian Wolf <juwolf@suse.de>
---
 modules.d/10i18n/module-setup.sh | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/modules.d/10i18n/module-setup.sh b/modules.d/10i18n/module-setup.sh
index f7ec0d9..b25b650 100755
--- a/modules.d/10i18n/module-setup.sh
+++ b/modules.d/10i18n/module-setup.sh
@@ -198,7 +198,12 @@ install() {
         if [[ ${FONT_MAP} ]]
         then
             FONT_MAP=${FONT_MAP%.trans}
-            inst_simple ${kbddir}/consoletrans/${FONT_MAP}.trans
+            if [ -f "${FONT_MAP}".trans ]; then
+                inst_simple ${kbddir}/consoletrans/${FONT_MAP}.trans
+            else if [ -f "$FONT_MAP" ]; then
+                inst_simple ${kbddir}/consoletrans/${FONT_MAP}
+                fi
+            fi
         fi
 
         if [[ ${FONT_UNIMAP} ]]
-- 
1.8.5.2

openSUSE Build Service is sponsored by