加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
Fix-dracut-cmdline-options-and-conditionalize-them-t.patch 2.28 KB
一键复制 编辑 原始数据 按行查看 历史
chengquan 提交于 2019-12-30 14:36 . package init
From a6843cb0fc122a3bd8a7e4067c3783ef4ce69f33 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 16/60] 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 | 37 +++++++++++++++----------------------
1 file changed, 15 insertions(+), 22 deletions(-)
diff --git a/new-kernel-pkg b/new-kernel-pkg
index 90652da..997fb1f 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
-
- 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
+# 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
+
+ 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
--
1.8.3.1
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化