Blob Blame History Raw
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 8745e598d0e..8cff4c58ab5 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"