From 283797a45d93f94a7ea1844271bd918590136750 Mon Sep 17 00:00:00 2001 From: Nicolas Frayer Date: Fri, 15 Nov 2024 17:54:04 +0100 Subject: [PATCH] posttrans: added check for efi_home/grub.cfg Resolves: #2326502 Signed-off-by: Nicolas Frayer --- grub2.spec | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/grub2.spec b/grub2.spec index 314cecc..5c76835 100644 --- a/grub2.spec +++ b/grub2.spec @@ -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 - exit 0 #Already unified +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 2.12-13 +- posttrans: added check for efi_home/grub.cfg +- Resolves: #2326502 + * Wed Oct 23 2024 Leo Sandoval 2.12-12 - do-rebase: refactor command line parameters