grub2/0187-Don-t-update-the-cmdline-when-generating-legacy-menu.patch
Adam Williamson 5e72956199 Revert "Use my sort patch instead", fix BLS ostree detection
This reverts commit 93004a8494,
because it broke Rawhide. It also tries to fixes BLS ostree
detection to work in chroots (e.g. during installation) by also
checking for /ostree/repo.
2022-03-22 18:32:24 -07:00

37 lines
1.2 KiB
Diff

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