Change posttrans script to install grub-efi configuration

Remove xen.cfg modification code.
Clone grub-legacy configuration update code and modify to update EFI configuration
Remove comment stating that grub does not support xen in efi mode.
pull/136/head
JarrahG 4 years ago
parent 1252f79e8d
commit c4c351556e
No known key found for this signature in database
GPG Key ID: F0682DF4E62A050A

@ -514,19 +514,18 @@ if [ -f /etc/default/grub ]; then
fi
fi
if [ -f /boot/efi/EFI/qubes/xen.cfg ]; then
if ! grep -q plymouth.ignore-serial-consoles /boot/efi/EFI/qubes/xen.cfg; then
sed -i 's/kernel=.*/& plymouth.ignore-serial-consoles/g' /boot/efi/EFI/qubes/xen.cfg
fi
fi
/bin/kernel-install add %{kernelrelease} /boot/vmlinuz-%{kernelrelease} || exit $?
# grubby (used by new-kernel-pkg) do not understand xen entries in grub2 config
# Generate legacy boot grub config
if [ -x /sbin/new-kernel-pkg -a -e /boot/grub2/grub.cfg ]; then
grub2-mkconfig > /boot/grub2/grub.cfg
fi
# Generate EFI boot grub config
if [ -x /sbin/new-kernel-pkg -a -e /boot/efi/EFI/qubes/grub.cfg ]; then
grub2-mkconfig > /boot/efi/EFI/qubes/grub.cfg
fi
%preun
/bin/kernel-install remove %{kernelrelease} /boot/vmlinuz-%{kernelrelease} || exit $?

Loading…
Cancel
Save