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

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