Skip to content

Commit

Permalink
kbuild: rpm-pkg: use kernel-install as a fallback for new-kernel-pkg
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Masahiro Yamada <[email protected]>
  • Loading branch information
martinezjavier authored and masahir0y committed Apr 13, 2018
1 parent 9564a8c commit eea6f62
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions scripts/package/mkspec
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@ $S$M ln -sf /usr/src/kernels/$KERNELRELEASE source
%preun
if [ -x /sbin/new-kernel-pkg ]; then
new-kernel-pkg --remove $KERNELRELEASE --rminitrd --initrdfile=/boot/initramfs-$KERNELRELEASE.img
elif [ -x /usr/bin/kernel-install ]; then
kernel-install remove $KERNELRELEASE
fi
%postun
Expand Down

0 comments on commit eea6f62

Please sign in to comment.