]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
i18n/module-setup.sh: s/error/info if no keymap is configured
authorHarald Hoyer <harald@redhat.com>
Thu, 5 Jul 2012 08:28:56 +0000 (10:28 +0200)
committerHarald Hoyer <harald@redhat.com>
Thu, 5 Jul 2012 09:15:35 +0000 (11:15 +0200)
https://bugzilla.redhat.com/show_bug.cgi?id=836418

modules.d/10i18n/module-setup.sh

index a7ddc828202e1f796743dcad057b337621faacde..a1cf1c87b8e11a969ae573ffa59f5cca39670506 100755 (executable)
@@ -74,9 +74,11 @@ install() {
             for map in ${item[1]//,/ }
             do
                 map=(${map//-/ })
-                value=$(grep "^${map[0]}=" "${item[0]}")
-                value=${value#*=}
-                echo "${map[1]:-${map[0]}}=${value}"
+                if [[ -f "${item[0]}" ]]; then
+                    value=$(grep "^${map[0]}=" "${item[0]}")
+                    value=${value#*=}
+                    echo "${map[1]:-${map[0]}}=${value}"
+                fi
             done
         done
     }
@@ -155,9 +157,10 @@ install() {
         EXT_KEYMAPS+=\ ${UNIKEYMAP}\ ${GRP_TOGGLE}
 
         [[ ${KEYMAP} ]] || {
-            derror 'No KEYMAP.'
+            dinfo 'No KEYMAP configured.'
             return 1
         }
+
         findkeymap ${KEYMAP}
 
         for map in ${EXT_KEYMAPS}