mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-12-29 09:16:33 +00:00
scripts/prune-kernel: Use kernel-install if available
If the new-kernel-pkg utility isn't present, try using kernel-install. This is what the %preun scriptlet in scripts/package/mkspec does too. Signed-off-by: Reza Arbab <arbab@linux.ibm.com> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
This commit is contained in:
parent
f774f5bb87
commit
5d53508d1b
@ -16,6 +16,10 @@ do
|
|||||||
rm -f "/boot/initramfs-$f.img" "/boot/System.map-$f"
|
rm -f "/boot/initramfs-$f.img" "/boot/System.map-$f"
|
||||||
rm -f "/boot/vmlinuz-$f" "/boot/config-$f"
|
rm -f "/boot/vmlinuz-$f" "/boot/config-$f"
|
||||||
rm -rf "/lib/modules/$f"
|
rm -rf "/lib/modules/$f"
|
||||||
|
if [ -x "$(command -v new-kernel-pkg)" ]; then
|
||||||
new-kernel-pkg --remove $f
|
new-kernel-pkg --remove $f
|
||||||
|
elif [ -x "$(command -v kernel-install)" ]; then
|
||||||
|
kernel-install remove $f
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
Loading…
Reference in New Issue
Block a user