kbuild: rpm-pkg: use kernel-install as a fallback for new-kernel-pkg

The new-kernel-pkg script is only present when grubby is installed, but it
may not always be the case. So if the script isn't present, attempt to use
the kernel-install script as a fallback instead.

Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>

authored by Javier Martinez Canillas and committed by Masahiro Yamada eea6f62b 9564a8cf

+2
+2
scripts/package/mkspec
··· 118 118 %preun 119 119 if [ -x /sbin/new-kernel-pkg ]; then 120 120 new-kernel-pkg --remove $KERNELRELEASE --rminitrd --initrdfile=/boot/initramfs-$KERNELRELEASE.img 121 + elif [ -x /usr/bin/kernel-install ]; then 122 + kernel-install remove $KERNELRELEASE 121 123 fi 122 124 123 125 %postun