Skip to content

Commit eea6f62

Browse files
martinezjaviermasahir0y
authored andcommitted
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 <[email protected]> Signed-off-by: Masahiro Yamada <[email protected]>
1 parent 9564a8c commit eea6f62

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

scripts/package/mkspec

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,8 @@ $S$M ln -sf /usr/src/kernels/$KERNELRELEASE source
118118
%preun
119119
if [ -x /sbin/new-kernel-pkg ]; then
120120
new-kernel-pkg --remove $KERNELRELEASE --rminitrd --initrdfile=/boot/initramfs-$KERNELRELEASE.img
121+
elif [ -x /usr/bin/kernel-install ]; then
122+
kernel-install remove $KERNELRELEASE
121123
fi
122124
123125
%postun

0 commit comments

Comments
 (0)