提交 5d53508d 编写于 作者: R Reza Arbab 提交者: Masahiro Yamada

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: NReza Arbab <arbab@linux.ibm.com>
Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org>
上级 f774f5bb
...@@ -16,6 +16,10 @@ do ...@@ -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"
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 fi
done done
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册