1f092caba7
Add comments and revert logic changes in 01_fallback_counting Remove quotes when reading ID value from /etc/os-release Related: rhbz#1650706 blscfg: expand grub_users before passing to grub_normal_add_menu_entry() Resolves: rhbz#1650706 Drop buggy downstream patch "efinet: retransmit if our device is busy" Resolves: rhbz#1649048 Make the menu entry users option argument to be optional Related: rhbz#1652434 10_linux_bls: add missing menu entries options Resolves: rhbz#1652434 Drop "Be more aggro about actually using the *configured* network device." Resolves: rhbz#1654388 Fix menu entry selection based on title Resolves: rhbz#1654936 Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
80 lines
2.5 KiB
Diff
80 lines
2.5 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Javier Martinez Canillas <javierm@redhat.com>
|
|
Date: Fri, 5 Oct 2018 16:29:47 +0200
|
|
Subject: [PATCH] Only set kernelopts in grubenv if it wasn't set before
|
|
|
|
Users may want to use a different command line parameters, so if there's
|
|
a kernelopts var set in grubenv, grub2-mkconfig shouldn't reset it.
|
|
|
|
While being there, print a warning so users know that they shouldn't edit
|
|
the grub config file and instead edit the BootLoaderSpec config files.
|
|
|
|
Resolves: rhbz#1636466
|
|
|
|
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
|
|
---
|
|
util/grub.d/10_linux.in | 20 +++++++++++++++++++-
|
|
util/grub.d/10_linux_bls.in | 4 +++-
|
|
2 files changed, 22 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
|
|
index 9682e97b7f5..01e66e5fc74 100644
|
|
--- a/util/grub.d/10_linux.in
|
|
+++ b/util/grub.d/10_linux.in
|
|
@@ -82,6 +82,20 @@ case x"$GRUB_FS" in
|
|
;;
|
|
esac
|
|
|
|
+populate_header_warn()
|
|
+{
|
|
+cat <<EOF
|
|
+
|
|
+# This section was generated by a script. Do not modify the generated file - all changes
|
|
+# will be lost the next time file is regenerated. Instead edit the BootLoaderSpec files.
|
|
+#
|
|
+# The blscfg command parses the BootLoaderSpec files stored in /boot/loader/entries and
|
|
+# populates the boot menu. Please refer to the Boot Loader Specification documentation
|
|
+# for the files format: https://www.freedesktop.org/wiki/Specifications/BootLoaderSpec/.
|
|
+
|
|
+EOF
|
|
+}
|
|
+
|
|
mktitle ()
|
|
{
|
|
local title_type
|
|
@@ -141,6 +155,8 @@ linux_entry ()
|
|
prepare_grub_to_access_device ${boot_device} boot
|
|
fi
|
|
|
|
+ populate_header_warn
|
|
+
|
|
cat << EOF
|
|
insmod blscfg
|
|
blscfg
|
|
@@ -150,7 +166,9 @@ fi
|
|
EOF
|
|
|
|
${grub_editenv} - set saved_entry=0
|
|
- ${grub_editenv} - set kernelopts="root=${linux_root_device_thisversion} ro ${args}"
|
|
+ if ! grub2-editenv - list | grep -q kernelopts; then
|
|
+ ${grub_editenv} - set kernelopts="root=${linux_root_device_thisversion} ro ${args}"
|
|
+ fi
|
|
|
|
exit 0
|
|
fi
|
|
diff --git a/util/grub.d/10_linux_bls.in b/util/grub.d/10_linux_bls.in
|
|
index 3cc7803c6a1..8a3379578bd 100644
|
|
--- a/util/grub.d/10_linux_bls.in
|
|
+++ b/util/grub.d/10_linux_bls.in
|
|
@@ -201,7 +201,9 @@ linux_entry ()
|
|
populate_menu
|
|
|
|
${grub_editenv} - set saved_entry=0
|
|
- ${grub_editenv} - set kernelopts="root=${linux_root_device_thisversion} ro ${args}"
|
|
+ if ! grub2-editenv - list | grep -q kernelopts; then
|
|
+ ${grub_editenv} - set kernelopts="root=${linux_root_device_thisversion} ro ${args}"
|
|
+ fi
|
|
|
|
exit 0
|
|
fi
|