fixgrub.bash: only run when grub.cfg.rpmsave exists

This commit is contained in:
Aminda Suomalainen 2022-09-17 21:53:31 +03:00
parent c2ae326994
commit 351ab22116
Signed by: Mikaela
SSH Key Fingerprint: SHA256:CXLULpqNBdUKB6E6fLA1b/4SzG0HvKD19PbIePU175Q
1 changed files with 4 additions and 2 deletions

View File

@ -6,8 +6,10 @@
set -x
# This script is Fedora specific.
if [ -f /boot/efi/EFI/fedora/grub.cfg ]
# This script is Fedora specific for now.
# There is no reason to run if dnf hasn't moved the proper config aside.
if [ -f /boot/efi/EFI/fedora/grub.cfg.rpmsave ]
then
rm -f /boot/efi/EFI/fedora/grub.cfg.rpmsave
grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg