Commit eea6f62b authored by Javier Martinez Canillas's avatar Javier Martinez Canillas Committed by Masahiro Yamada

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: default avatarJavier Martinez Canillas <javierm@redhat.com>
Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
parent 9564a8cf
...@@ -118,6 +118,8 @@ $S$M ln -sf /usr/src/kernels/$KERNELRELEASE source ...@@ -118,6 +118,8 @@ $S$M ln -sf /usr/src/kernels/$KERNELRELEASE source
%preun %preun
if [ -x /sbin/new-kernel-pkg ]; then if [ -x /sbin/new-kernel-pkg ]; then
new-kernel-pkg --remove $KERNELRELEASE --rminitrd --initrdfile=/boot/initramfs-$KERNELRELEASE.img new-kernel-pkg --remove $KERNELRELEASE --rminitrd --initrdfile=/boot/initramfs-$KERNELRELEASE.img
elif [ -x /usr/bin/kernel-install ]; then
kernel-install remove $KERNELRELEASE
fi fi
%postun %postun
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment