nalika / rpms / grub2

Forked from rpms/grub2 2 years ago
Clone

Blame SOURCES/0250-10_linux_bls-add-missing-menu-entries-options.patch

8631a2
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
8631a2
From: Javier Martinez Canillas <javierm@redhat.com>
8631a2
Date: Thu, 22 Nov 2018 16:12:19 +0100
8631a2
Subject: [PATCH] 10_linux_bls: add missing menu entries options
8631a2
8631a2
The script that generates menu entries in the grub.cfg from BLS snippets
8631a2
wasn't filling some important options, like the --id, --class and --user
8631a2
if these were defined in the BLS.
8631a2
8631a2
Resolves: rhbz#1652434
8631a2
8631a2
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
8631a2
---
8631a2
 util/grub.d/10_linux_bls.in | 15 ++++++++++++++-
8631a2
 1 file changed, 14 insertions(+), 1 deletion(-)
8631a2
8631a2
diff --git a/util/grub.d/10_linux_bls.in b/util/grub.d/10_linux_bls.in
09e3cc
index 8745e598d..8cff4c58a 100644
8631a2
--- a/util/grub.d/10_linux_bls.in
8631a2
+++ b/util/grub.d/10_linux_bls.in
8631a2
@@ -127,6 +127,9 @@ read_config()
8631a2
     initrd=""
8631a2
     options=""
8631a2
     linux=""
8631a2
+    grub_users=""
8631a2
+    grub_arg=""
8631a2
+    grub_class=""
8631a2
 
8631a2
     while read -r line
8631a2
     do
8631a2
@@ -145,6 +148,15 @@ read_config()
8631a2
             "options")
8631a2
                 options=${value}
8631a2
                 ;;
8631a2
+            "grub_users")
8631a2
+                grub_users=${value}
8631a2
+                ;;
8631a2
+            "grub_arg")
8631a2
+                grub_arg=${value}
8631a2
+                ;;
8631a2
+            "grub_class")
8631a2
+                grub_class=${value}
8631a2
+                ;;
8631a2
         esac
8631a2
     done < ${config_file}
8631a2
 }
8631a2
@@ -167,7 +179,8 @@ populate_menu()
8631a2
 
8631a2
     for bls in "${files[@]}" ; do
8631a2
         read_config "${blsdir}/${bls}.conf"
8631a2
-        menu="${menu}menuentry '${title}' {\n"
8631a2
+
8631a2
+        menu="${menu}menuentry '${title}' --class ${grub_class} ${grub_arg} --users ${grub_users} --id ${bls} {\n"
8631a2
         menu="${menu}\t linux ${linux} ${options}\n"
8631a2
         if [ -n "${initrd}" ] ; then
8631a2
             menu="${menu}\t initrd ${boot_prefix}${initrd}\n"