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