Blame SOURCES/0016-Grub-handle-top-level-boot-directive-494.patch

3efdbb
From 06b3a79ee2bfdb4ae3675232e82ae3d06bbba353 Mon Sep 17 00:00:00 2001
3efdbb
From: Pino Toscano <ptoscano@redhat.com>
3efdbb
Date: Tue, 12 Sep 2017 10:58:46 +0200
3efdbb
Subject: [PATCH] Grub: handle top-level "boot" directive (#494)
3efdbb
3efdbb
Grub 1 effectively ignores commands in the configuration which work only
3efdbb
in the command line.  The generated configuration by anaconda included
3efdbb
also a commented "boot=device" entry at the beginning: uncommenting that
3efdbb
does not make the configuration invalid, but makes the Grub lens not
3efdbb
able to parse it.
3efdbb
3efdbb
Since there is no harm in representing a configuration key that will be
3efdbb
effectively ignored, accept top-level "boot" entries as well.
3efdbb
---
3efdbb
 lenses/grub.aug            | 1 +
3efdbb
 lenses/tests/test_grub.aug | 4 ++--
3efdbb
 2 files changed, 3 insertions(+), 2 deletions(-)
3efdbb
3efdbb
diff --git a/lenses/grub.aug b/lenses/grub.aug
3efdbb
index c52d16c6..9866f3f7 100644
3efdbb
--- a/lenses/grub.aug
3efdbb
+++ b/lenses/grub.aug
3efdbb
@@ -148,6 +148,7 @@ module Grub =
3efdbb
                      | kw_menu_arg "foreground"
3efdbb
                      | kw_menu_arg "background"
3efdbb
                      | kw_menu_arg "verbose"
3efdbb
+                     | kw_menu_arg "boot" (* only for CLI, ignored in conf *)
3efdbb
                      | serial
3efdbb
                      | terminal
3efdbb
                      | password_arg
3efdbb
diff --git a/lenses/tests/test_grub.aug b/lenses/tests/test_grub.aug
3efdbb
index f022ef72..8a0d9f4a 100644
3efdbb
--- a/lenses/tests/test_grub.aug
3efdbb
+++ b/lenses/tests/test_grub.aug
3efdbb
@@ -8,7 +8,7 @@ module Test_grub =
3efdbb
 #          root (hd0,0)
3efdbb
 #          kernel /vmlinuz-version ro root=/dev/vg00/lv00
3efdbb
 #          initrd /initrd-version.img
3efdbb
-#boot=/dev/sda
3efdbb
+boot=/dev/sda
3efdbb
 device (hd0) HD(1,800,64000,9895c137-d4b2-4e3b-a93b-dc9ac4)
3efdbb
 password --md5 $1$M9NLj$p2gs87vwNv48BUu.wAfVw0
3efdbb
 default=0
3efdbb
@@ -53,7 +53,7 @@ title othermenu
3efdbb
     { "#comment" = "root (hd0,0)" }
3efdbb
     { "#comment" = "kernel /vmlinuz-version ro root=/dev/vg00/lv00" }
3efdbb
     { "#comment" = "initrd /initrd-version.img" }
3efdbb
-    { "#comment" = "boot=/dev/sda" }
3efdbb
+    { "boot" = "/dev/sda" }
3efdbb
     { "device"   = "(hd0)"
3efdbb
         { "file" = "HD(1,800,64000,9895c137-d4b2-4e3b-a93b-dc9ac4)" } }
3efdbb
     { "password" = "$1$M9NLj$p2gs87vwNv48BUu.wAfVw0"
3efdbb
-- 
9f41aa
2.24.1
3efdbb