1 Star 0 Fork 99

yangqiming/grub2

forked from src-openEuler/grub2 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0204-10_linux.in-Enable-BLS-configuration-if-new-kernel-p.patch 1.56 KB
一键复制 编辑 原始数据 按行查看 历史
hanzj0122_admin 提交于 2020-07-29 20:47 . update to 2.04
From 4522b79934cf8777fbd4bdc437497ed22f77a9f0 Mon Sep 17 00:00:00 2001
From: Javier Martinez Canillas <javierm@redhat.com>
Date: Thu, 16 Apr 2020 18:53:05 +0200
Subject: [PATCH 204/220] 10_linux.in: Enable BLS configuration if
new-kernel-pkg isn't present
Currently if the the GRUB_ENABLE_BLSCFG option in /etc/default/grub hasn't
been set, the 10_linux script will generate a GRUB configuration that does
not include the blscfg command to populate the menu entries from BLS files.
But on kernel install the /usr/lib/kernel/install.d/20-grub.install script
will only add menuentry commands to the GRUB config file if the old grubby
tool and new-kernel-pkg script are installed.
So a configuration with the GRUB_ENABLE_BLSCFG option will lead to a setup
where new kernel entries are not added. Make a BLS config the default if
that option wasn't set and the new-kernel-pkg script is not present.
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
---
util/grub.d/10_linux.in | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
index c72cc32..847646b 100644
--- a/util/grub.d/10_linux.in
+++ b/util/grub.d/10_linux.in
@@ -164,6 +164,11 @@ populate_menu()
printf "$menu"
}
+# Make BLS the default if GRUB_ENABLE_BLSCFG was not set and grubby is not installed.
+if [ -z "${GRUB_ENABLE_BLSCFG}" ] && [ -z "$(which new-kernel-pkg 2> /dev/null)" ]; then
+ GRUB_ENABLE_BLSCFG="true"
+fi
+
if [ "x${GRUB_ENABLE_BLSCFG}" = "xtrue" ]; then
if [ x$dirname = x/ ]; then
if [ -z "${prepare_root_cache}" ]; then
--
1.8.3.1
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/yyangqiming/grub2.git
git@gitee.com:yyangqiming/grub2.git
yyangqiming
grub2
grub2
master

搜索帮助