Don't try to switch to a BLS config if GRUB_ENABLE_BLSCFG is already set

There's no point on executing the script if GRUB_ENABLE_BLSCFG has already
been set.

Commit taken (see below) and modified from rhel-10-branch but adopted for
rhel-8-main branch.

   298aa12e * Only execute grub2-switch-to-blscfg if GRUB_ENABLE_BLSCFG isn't set

Resolves: #RHEL-86913

Signed-off-by: Leo Sandoval <lsandova@redhat.com>
This commit is contained in:
Leo Sandoval 2025-04-23 13:27:15 -06:00
parent c0ec7d36c1
commit d8b3b9c701

View File

@ -7,7 +7,7 @@
Name: grub2 Name: grub2
Epoch: 1 Epoch: 1
Version: 2.02 Version: 2.02
Release: 165%{?dist} Release: 166%{?dist}
Summary: Bootloader with support for Linux, Multiboot and more Summary: Bootloader with support for Linux, Multiboot and more
Group: System Environment/Base Group: System Environment/Base
License: GPLv3+ License: GPLv3+
@ -307,7 +307,10 @@ if [ "$1" = 1 ]; then
fi fi
if [ "$1" = 2 ]; then if [ "$1" = 2 ]; then
if [ -f /etc/default/grub ]; then
! grep -q '^GRUB_ENABLE_BLSCFG=.*' /etc/default/grub && \
/sbin/grub2-switch-to-blscfg --backup-suffix=.rpmsave &>/dev/null || : /sbin/grub2-switch-to-blscfg --backup-suffix=.rpmsave &>/dev/null || :
fi
fi fi
%posttrans common %posttrans common
@ -523,6 +526,10 @@ fi
%endif %endif
%changelog %changelog
* Wed Apr 23 2025 Leo Sandoval <lsandova@redhat.com> - 2.02-166
- Don't try to switch to a BLS config if GRUB_ENABLE_BLSCFG is already set
- Resolves: #RHEL-86913
* Thu Apr 17 2025 Nicolas Frayer <nfrayer@redhat.com> - 2.02-165 * Thu Apr 17 2025 Nicolas Frayer <nfrayer@redhat.com> - 2.02-165
- fs/ext2: Rework of OOB read patch - fs/ext2: Rework of OOB read patch
- Resolves: #RHEL-86553 - Resolves: #RHEL-86553