scripts/prune-kernel: Use kernel-install if available
PATCH 1/1 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 <[email protected]>
---
Hope I've sent this to the right people. get_maintainer.pl came up blank, but kbuild seems like the nearest match in MAINTAINERS.
scripts/prune-kernel | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
scripts/prune-kernel +5 -1
@@ -16,6 +16,10 @@ do rm -f "/boot/initramfs-$f.img" "/boot/System.map-$f" rm -f "/boot/vmlinuz-$f" "/boot/config-$f" rm -rf "/lib/modules/$f" - new-kernel-pkg --remove $f + if [ -x "$(command -v new-kernel-pkg)" ]; then + new-kernel-pkg --remove $f + elif [ -x "$(command -v kernel-install)" ]; then + kernel-install remove $f + fi fi done
Signature · 1 line
2.27.0
Quoted 9 lines · Reza Arbab
If the new-kernel-pkg utility isn't present, try using kernel-install. This is what the %preun scriptlet in
scripts/package/mkspecdoes too.Signed-off-by Reza Arbab <[email protected]>---
Hope I've sent this to the right people. get_maintainer.pl came up blank, but kbuild seems like the nearest match inMAINTAINERS.
Applied to linux-kbuild. Thanks.
Quoted 22 lines
scripts/prune-kernel | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)scripts/prune-kernel +5
-2@@ -16,6 +16,10 @@ do rm -f "/boot/initramfs-$f.img" "/boot/System.map-$f" rm -f "/boot/vmlinuz-$f" "/boot/config-$f" rm -rf "/lib/modules/$f" - new-kernel-pkg --remove $f + if [ -x "$(command -v new-kernel-pkg)" ]; then + new-kernel-pkg --remove $f + elif [ -x "$(command -v kernel-install)" ]; then + kernel-install remove $f + fi fi done --2.27.0
Signature · 2 lines
Best Regards Masahiro Yamada