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