Blame SOURCES/0180-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
fd0330
index e490e1a43a..865af3d6c4 100644
5593c8
--- a/util/grub.d/10_linux.in
5593c8
+++ b/util/grub.d/10_linux.in
fd0330
@@ -256,7 +256,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