752ceb1
From e73ac6cf8f166b6a87a06a504af66730e5c37e22 Mon Sep 17 00:00:00 2001
0bcec26
From: Javier Martinez Canillas <javierm@redhat.com>
0bcec26
Date: Fri, 6 Apr 2018 14:08:36 +0200
752ceb1
Subject: [PATCH] Set the first boot menu entry as default when using BLS
752ceb1
 fragments
0bcec26
0bcec26
When BootLoaderSpec configuration files are used, the default boot menu
0bcec26
entry is always set to the first entry as sorted by the blscfg command.
0bcec26
0bcec26
Suggested-by: Peter Jones <pjones@redhat.com>
0bcec26
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
0bcec26
---
0bcec26
 util/grub.d/10_linux.in | 1 +
0bcec26
 1 file changed, 1 insertion(+)
0bcec26
0bcec26
diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
752ceb1
index aec1ca3eba0..1e7ec7071c3 100644
0bcec26
--- a/util/grub.d/10_linux.in
0bcec26
+++ b/util/grub.d/10_linux.in
752ceb1
@@ -158,6 +158,7 @@ if [ -s \$prefix/grubenv ]; then
0bcec26
 fi
0bcec26
 EOF
0bcec26
 
0bcec26
+    ${grub_editenv} - set saved_entry=0
0bcec26
     ${grub_editenv} - set kernelopts="root=${linux_root_device_thisversion} ro ${args}"
0bcec26
 
0bcec26
     exit 0