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

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