加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0250-10_linux_bls-add-missing-menu-entries-options.patch 1.74 KB
一键复制 编辑 原始数据 按行查看 历史
geliwei 提交于 2022-04-13 15:15 . update to grub2-2.02-120.el8.src.rpm
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Javier Martinez Canillas <javierm@redhat.com>
Date: Thu, 22 Nov 2018 16:12:19 +0100
Subject: [PATCH] 10_linux_bls: add missing menu entries options
The script that generates menu entries in the grub.cfg from BLS snippets
wasn't filling some important options, like the --id, --class and --user
if these were defined in the BLS.
Resolves: rhbz#1652434
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
---
util/grub.d/10_linux_bls.in | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/util/grub.d/10_linux_bls.in b/util/grub.d/10_linux_bls.in
index 8745e598d..8cff4c58a 100644
--- a/util/grub.d/10_linux_bls.in
+++ b/util/grub.d/10_linux_bls.in
@@ -127,6 +127,9 @@ read_config()
initrd=""
options=""
linux=""
+ grub_users=""
+ grub_arg=""
+ grub_class=""
while read -r line
do
@@ -145,6 +148,15 @@ read_config()
"options")
options=${value}
;;
+ "grub_users")
+ grub_users=${value}
+ ;;
+ "grub_arg")
+ grub_arg=${value}
+ ;;
+ "grub_class")
+ grub_class=${value}
+ ;;
esac
done < ${config_file}
}
@@ -167,7 +179,8 @@ populate_menu()
for bls in "${files[@]}" ; do
read_config "${blsdir}/${bls}.conf"
- menu="${menu}menuentry '${title}' {\n"
+
+ menu="${menu}menuentry '${title}' --class ${grub_class} ${grub_arg} --users ${grub_users} --id ${bls} {\n"
menu="${menu}\t linux ${linux} ${options}\n"
if [ -n "${initrd}" ] ; then
menu="${menu}\t initrd ${boot_prefix}${initrd}\n"
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化