nalika / rpms / grub2

Forked from rpms/grub2 2 years ago
Clone

Blame SOURCES/0209-Don-t-update-the-cmdline-when-generating-legacy-menu.patch

5593c8
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
5593c8
From: Javier Martinez Canillas <javierm@redhat.com>
5593c8
Date: Thu, 17 Jun 2021 14:31:42 +0200
5593c8
Subject: [PATCH] Don't update the cmdline when generating legacy menuentry
5593c8
 commands
5593c8
5593c8
On OPAL ppc64le machines with an old petitboot version that doesn't have
5593c8
support to parse BLS snippets, the grub2-mkconfig script is executed to
5593c8
generate menuentry commands from the BLS snippets.
5593c8
5593c8
In this case, the script is executed with the --no-grubenv-update option
5593c8
that indicates that no side effects should happen when running the script.
5593c8
5593c8
But the options field in the BLS snippets are updated regardless, only do
5593c8
the update if --no-grubenv-update was not used.
5593c8
5593c8
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
5593c8
---
5593c8
 util/grub.d/10_linux.in | 4 +++-
5593c8
 1 file changed, 3 insertions(+), 1 deletion(-)
5593c8
5593c8
diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
d3c3ab
index 68adb55d893..c9296154f51 100644
5593c8
--- a/util/grub.d/10_linux.in
5593c8
+++ b/util/grub.d/10_linux.in
5593c8
@@ -261,7 +261,9 @@ if [ -z "\${kernelopts}" ]; then
5593c8
 fi
5593c8
 EOF
5593c8
 
5593c8
-  update_bls_cmdline
5593c8
+  if [ "x${GRUB_GRUBENV_UPDATE}" = "xyes" ]; then
5593c8
+      update_bls_cmdline
5593c8
+  fi
5593c8
 
5593c8
   if [ "x${BLS_POPULATE_MENU}" = "xtrue" ]; then
5593c8
       populate_menu