diff options
author | Paolo Abeni <pabeni@redhat.com> | 2016-03-02 15:28:00 +0100 |
---|---|---|
committer | Michal Marek <mmarek@suse.com> | 2016-03-04 22:59:09 +0100 |
commit | 6ef41e22a320d95a246d45b673aa7247cc1bbf7b (patch) | |
tree | 215c0dff0e72f9574c3775064e9f277e01465404 /scripts/package | |
parent | c8b08ca558c0067bc9e15ce3f1e70af260410bb2 (diff) | |
download | linux-6ef41e22a320d95a246d45b673aa7247cc1bbf7b.tar.gz linux-6ef41e22a320d95a246d45b673aa7247cc1bbf7b.tar.bz2 linux-6ef41e22a320d95a246d45b673aa7247cc1bbf7b.zip |
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.
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Michal Marek <mmarek@suse.com>
Diffstat (limited to 'scripts/package')
-rwxr-xr-x | scripts/package/mkspec | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/package/mkspec b/scripts/package/mkspec index fe44d68e9344..b6de63cb3f23 100755 --- a/scripts/package/mkspec +++ b/scripts/package/mkspec @@ -138,6 +138,11 @@ echo "/sbin/installkernel $KERNELRELEASE /boot/.vmlinuz-$KERNELRELEASE-rpm /boot echo "rm -f /boot/.vmlinuz-$KERNELRELEASE-rpm /boot/.System.map-$KERNELRELEASE-rpm" echo "fi" echo "" +echo "%preun" +echo "if [ -x /sbin/new-kernel-pkg ]; then" +echo "new-kernel-pkg --remove $KERNELRELEASE --rminitrd --initrdfile=/boot/initramfs-$KERNELRELEASE.img" +echo "fi" +echo "" echo "%files" echo '%defattr (-, root, root)' echo "/lib/modules/$KERNELRELEASE" |