mirror of
https://abf.rosa.ru/djam/kernel-6.6.git
synced 2025-02-25 20:02:47 +00:00
Remove kdump-specific initrd images when the kernel is uninstalled
This commit is contained in:
parent
c33d032207
commit
8fca6a536d
1 changed files with 4 additions and 1 deletions
|
@ -871,7 +871,7 @@ done
|
||||||
# uninstalled, initrd has been regenerated for the given kernel. However,
|
# uninstalled, initrd has been regenerated for the given kernel. However,
|
||||||
# the kernel itself might have been uninstalled before, so that (defunct)
|
# the kernel itself might have been uninstalled before, so that (defunct)
|
||||||
# initrd image files would be left behind. Remove them if the kernel itself
|
# initrd image files would be left behind. Remove them if the kernel itself
|
||||||
# is no longer installed. Should work if they are ininstalled in parallel
|
# is no longer installed. Should work if they are uninstalled in parallel
|
||||||
# too.
|
# too.
|
||||||
if ! test -f /boot/vmlinuz-${KernelVer}; then
|
if ! test -f /boot/vmlinuz-${KernelVer}; then
|
||||||
rm -f /boot/initrd-${KernelVer}.img
|
rm -f /boot/initrd-${KernelVer}.img
|
||||||
|
@ -998,6 +998,9 @@ EOF
|
||||||
cat > $kernel_files-postun <<EOF
|
cat > $kernel_files-postun <<EOF
|
||||||
rm -f /boot/initrd-${KernelVer}.img
|
rm -f /boot/initrd-${KernelVer}.img
|
||||||
rm -f /boot/initrd-${KernelVer}_old.img
|
rm -f /boot/initrd-${KernelVer}_old.img
|
||||||
|
rm -f /boot/initrd-${KernelVer}kdump.img
|
||||||
|
rm -f /boot/initramfs-${KernelVer}kdump.img
|
||||||
|
|
||||||
# Third-party modules might have left something in /lib/modules/.../kernel/.
|
# Third-party modules might have left something in /lib/modules/.../kernel/.
|
||||||
rm -rf /lib/modules/${KernelVer}/kernel/
|
rm -rf /lib/modules/${KernelVer}/kernel/
|
||||||
rm -rf /lib/modules/${KernelVer}/modules*
|
rm -rf /lib/modules/${KernelVer}/modules*
|
||||||
|
|
Loading…
Add table
Reference in a new issue