PREUN
/bin/sh
exec > /var/log/grub2_preun.log 2>&1
# Only if uninstalling
if [ $1 -eq 0 ]; then
rm -rf /boot/grub2/x86_64-efi
rm -rf /boot/grub2/locale
fi
# If updating grub2-efi from version below 2.02-0.git9752.4 then re-generate menu (Mga#13493)
# because Fedora patches to use "linuxefi" have now been removed.
POSTIN
/bin/sh
# On update re-install grub2 to where it was installed by drakboot if possible,
# otherwise next boot may fail due to mismatched boot code.
if [ $1 -eq 2 ]; then
if [ -f /boot/grub2/install.sh -a -x /usr/sbin/detectloader ]; then
LOADER=$(/usr/sbin/detectloader)
[ "$LOADER" = "GRUB2" ] && /boot/grub2/install.sh ||:
fi
fi
Triggers
grub2-efi <
2.02-0.git9752.4
/bin/sh
grub2-mkconfig -o /boot/grub2/grub.cfg