2022-09-10 22:09:44 +02:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2023-12-20 09:47:42 +01:00
|
|
|
# Theoretically this should never run
|
2023-12-20 09:38:26 +01:00
|
|
|
# READ https://fedoraproject.org/wiki/GRUB_2 !!!!!
|
2022-09-17 20:53:31 +02:00
|
|
|
|
2023-12-20 09:47:42 +01:00
|
|
|
set -x
|
|
|
|
|
|
|
|
# Fedora < 34
|
2023-12-20 09:38:26 +01:00
|
|
|
#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
|
|
|
|
#fi
|
2022-09-11 13:12:53 +02:00
|
|
|
|
2023-12-20 09:47:42 +01:00
|
|
|
# There is no reason to run if dnf hasn't moved the proper config aside.
|
|
|
|
if [ -f /etc/grub2.cfg.rpmsave ]; then
|
|
|
|
rm -f /etc/grub2.cfg.rpmsave
|
|
|
|
grub2-mkconfig -o /etc/grub2.cfg
|
|
|
|
fi
|
|
|
|
|
|
|
|
# There is no reason to run if dnf hasn't moved the proper config aside.
|
|
|
|
if [ -f /etc/grub2-efi.cfg.rpmsave ]; then
|
|
|
|
rm -f /etc/grub2-efi.cfg.rpmsave
|
|
|
|
grub2-mkconfig -o /etc/grub2-efi.cfg
|
|
|
|
fi
|
|
|
|
|
|
|
|
# There is no reason to run if dnf hasn't moved the proper config aside.
|
|
|
|
# Legacy boot method for grub update.
|
|
|
|
# if [ -f /boot/grub2/grub.cfg.rpmsave ]; then
|
|
|
|
# rm -f /boot/grub2/grub.cfg.rpmsave
|
|
|
|
# grub2-mkconfig -o /boot/grub2/grub.cfg
|
|
|
|
# fi
|
|
|
|
|
|
|
|
set +x
|