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

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