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

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