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

64 lines
2.3 KiB
Diff

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