posttrans: added check for efi_home/grub.cfg

Resolves: #2326502
Signed-off-by: Nicolas Frayer <nfrayer@redhat.com>
This commit is contained in:
Nicolas Frayer 2024-11-15 17:54:04 +01:00
parent 9eb852fbc5
commit 283797a45d

View file

@ -17,7 +17,7 @@
Name: grub2
Epoch: 1
Version: 2.12
Release: 12%{?dist}
Release: 13%{?dist}
Summary: Bootloader with support for Linux, Multiboot and more
License: GPL-3.0-or-later
URL: http://www.gnu.org/software/grub/
@ -368,8 +368,10 @@ else
fi
fi
if (((grep -q "configfile" ${EFI_HOME}/grub.cfg && grep -q "root-dev-only" ${EFI_HOME}/grub.cfg) || grep -q "source" ${EFI_HOME}/grub.cfg) && ! grep -q "# It is automatically generated by grub2-mkconfig using templates" ${EFI_HOME}/grub.cfg); then
if test -f ${EFI_HOME}/grub.cfg; then
if (((grep -q "configfile" ${EFI_HOME}/grub.cfg && grep -q "root-dev-only" ${EFI_HOME}/grub.cfg) || grep -q "source" ${EFI_HOME}/grub.cfg) && ! grep -q "# It is automatically generated by grub2-mkconfig using templates" ${EFI_HOME}/grub.cfg); then
exit 0 #Already unified
fi
fi
# create a stub grub2 config in EFI
@ -560,6 +562,10 @@ mv ${EFI_HOME}/grub.cfg.stb ${EFI_HOME}/grub.cfg
%endif
%changelog
* Fri Nov 15 2024 Nicolas Frayer <nfrayer@redhat.com> 2.12-13
- posttrans: added check for efi_home/grub.cfg
- Resolves: #2326502
* Wed Oct 23 2024 Leo Sandoval <lsandova@redhat.com> 2.12-12
- do-rebase: refactor command line parameters