From 2bfc20ed9b14d01108cf27b786c606f96258d694 Mon Sep 17 00:00:00 2001 From: Marek Marczykowski Date: Wed, 6 Feb 2013 00:16:14 +0100 Subject: [PATCH] spec: regenerate grub2 config after install Apparently new-kernel-pkg does not work for grub2 config with xen entries (new kernel isn't added to it at all). So regenerate grub2 config using grub2-mkconfig. --- kernel.spec | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/kernel.spec b/kernel.spec index f27bb7f..446494e 100644 --- a/kernel.spec +++ b/kernel.spec @@ -363,6 +363,11 @@ fi %posttrans /sbin/new-kernel-pkg --package %{name}-%{kernelrelease} --rpmposttrans %{kernelrelease} +# grubby (used by new-kernel-pkg) do not understand xen entries in grub2 config +if [ -e /boot/grub2/grub.cfg ]; then + grub2-mkconfig > /boot/grub2/grub.cfg +fi + %preun /sbin/new-kernel-pkg --rminitrd --rmmoddep --remove %{kernelrelease}