Blame SOURCES/0017-Fix-dracut-cmdline-options-and-conditionalize-them-t.patch

cca0c4
From a8fd0f15979d5f4632c337c8bcfbdbae2b957f67 Mon Sep 17 00:00:00 2001
cca0c4
From: marcosfrm <marcosfrm@users.noreply.github.com>
cca0c4
Date: Tue, 6 Oct 2015 08:29:02 -0300
cca0c4
Subject: [PATCH 17/55] Fix dracut cmdline options and conditionalize them to
cca0c4
 --add-dracut-args
cca0c4
cca0c4
By default initramfs generated by dracut is HostOnly and has vconsole.conf and locale.conf included. Instead of killing this import section, conditionalize it to --add-dracut-args.
cca0c4
cca0c4
Reference: http://git.kernel.org/cgit/boot/dracut/dracut.git/tree/modules.d/10i18n/parse-i18n.sh
cca0c4
---
cca0c4
 new-kernel-pkg | 35 ++++++++++++++---------------------
cca0c4
 1 file changed, 14 insertions(+), 21 deletions(-)
cca0c4
cca0c4
diff --git a/new-kernel-pkg b/new-kernel-pkg
cca0c4
index 90652da06b7..997fb1f4987 100755
cca0c4
--- a/new-kernel-pkg
cca0c4
+++ b/new-kernel-pkg
cca0c4
@@ -825,28 +825,21 @@ if [[ ${ARCH} =~ armv[5|7].*l ]]; then
cca0c4
 fi
cca0c4
 [ -n "$verbose" ] && echo "devtreedir is $devtreedir"
cca0c4
 
cca0c4
-# add dracut i18n, keyboard and plymouth kernel args if requested
cca0c4
-if [ -n "$dracut" -o -n "$adddracutargs" ]; then
cca0c4
-    if [ -r /etc/vconsole.conf ]; then
cca0c4
-	. /etc/vconsole.conf
cca0c4
-    elif  [ -r /etc/sysconfig/keyboard ]; then
cca0c4
-	. /etc/sysconfig/keyboard
cca0c4
-    fi
cca0c4
+# add dracut kernel args if requested
cca0c4
+if [ -n "$dracut" -a -n "$adddracutargs" ]; then
cca0c4
+    [ -r /etc/vconsole.conf ] && . /etc/vconsole.conf
cca0c4
+    [ -r /etc/locale.conf ] && . /etc/locale.conf
cca0c4
 
cca0c4
-    if [ -r /etc/locale.conf ]; then
cca0c4
-	. /etc/locale.conf
cca0c4
-    elif [ -r /etc/sysconfig/i18n ]; then
cca0c4
-	. /etc/sysconfig/i18n
cca0c4
-    fi
cca0c4
-
cca0c4
-    for i in SYSFONT SYSFONTACM UNIMAP LANG KEYTABLE; do
cca0c4
-        val=$(eval echo \$$i)
cca0c4
-        [ -n "$val" ] && kernargs="$kernargs $i=$val"
cca0c4
-    done
cca0c4
-
cca0c4
-    if [ -n "$KEYBOARDTYPE" -a "$KEYBOARDTYPE" != "pc" ]; then
cca0c4
-         kernargs="$kernargs KEYBOARDTYPE=$KEYBOARDTYPE"
cca0c4
-    fi
cca0c4
+    while read opt rd_opt; do
cca0c4
+        [ -n "${!opt}" ] && kernargs="$kernargs $rd_opt=\"${!opt}\""
cca0c4
+    done <<< 'KEYMAP      rd.vconsole.keymap
cca0c4
+              FONT        rd.vconsole.font
cca0c4
+              FONT_MAP    rd.vconsole.font.map
cca0c4
+              FONT_UNIMAP rd.vconsole.font.unimap
cca0c4
+              UNICODE     rd.vconsole.font.unicode
cca0c4
+              EXT_KEYMAP  rd.vconsole.keymap.ext
cca0c4
+              LANG        rd.locale.LANG
cca0c4
+              LC_ALL      rd.locale.LC_ALL'
cca0c4
 fi
cca0c4
 
cca0c4
 # set this as the default if we have the package and it matches
cca0c4
-- 
cca0c4
2.17.1
cca0c4