History

kbuild/mkspec: clean boot loader configuration on rpm removal

This patch add a rpm preuninstall scriptlet to cleanup the boot loader configuration on kernel package uninstall. The initrd for the to-be-removed kernel is deleted, too.

Paolo Abeni committed 10 years ago

Commit 6ef41e21 parent c8b08ca1 file · +5 −0Browse files

Showing the changes to scripts (1 of 1 file). Show all

Unified · Split

scripts/package/mkspec+5−0
@@ -138,6 +138,11 @@ echo "/sbin/installkernel $KERNELRELEASE /boot/.vmlinuz-$KERNELRELEASE-rpm /boot · 137 unmodified lines
138echo "rm -f /boot/.vmlinuz-$KERNELRELEASE-rpm /boot/.System.map-$KERNELRELEASE-rpm"138echo "rm -f /boot/.vmlinuz-$KERNELRELEASE-rpm /boot/.System.map-$KERNELRELEASE-rpm"
139echo "fi"139echo "fi"
140echo ""140echo ""
141echo "%preun"
142echo "if [ -x /sbin/new-kernel-pkg ]; then"
143echo "new-kernel-pkg --remove $KERNELRELEASE --rminitrd --initrdfile=/boot/initramfs-$KERNELRELEASE.img"
144echo "fi"
145echo ""
141echo "%files"146echo "%files"
142echo '%defattr (-, root, root)'147echo '%defattr (-, root, root)'
143echo "/lib/modules/$KERNELRELEASE"148echo "/lib/modules/$KERNELRELEASE"