mirror of
https://git.proxmox.com/git/pve-kernel-meta
synced 2025-08-05 12:54:18 +00:00
efiboot: call on kernel removal as well
but don't pass in newly 'installed' kernel version Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
parent
a8dad4e801
commit
c2f02a98c9
1
debian/pve-kernel-helper.install
vendored
1
debian/pve-kernel-helper.install
vendored
@ -1,3 +1,4 @@
|
||||
etc/kernel/postinst.d/*
|
||||
etc/kernel/postrm.d/*
|
||||
usr/sbin/pveesptool
|
||||
usr/share/pve-kernel-helper/scripts/functions
|
||||
|
@ -1,15 +1,18 @@
|
||||
KERNEL_HOOKSCRIPTS = pve-auto-removal zz-pve-efiboot
|
||||
SHARE_FILES = functions
|
||||
|
||||
HOOKDIR = ${DESTDIR}/etc/kernel/postinst.d
|
||||
POSTINSTHOOKDIR = ${DESTDIR}/etc/kernel/postinst.d
|
||||
POSTRMHOOKDIR = ${DESTDIR}/etc/kernel/postrm.d
|
||||
SHARE_SCRIPTDIR = ${DESTDIR}/usr/share/pve-kernel-helper/scripts
|
||||
|
||||
.PHONY: all
|
||||
all:
|
||||
|
||||
install:
|
||||
install -d ${HOOKDIR}
|
||||
install -m 0755 ${KERNEL_HOOKSCRIPTS} ${HOOKDIR}
|
||||
install -d ${POSTINSTHOOKDIR}
|
||||
install -m 0755 ${KERNEL_HOOKSCRIPTS} ${POSTINSTHOOKDIR}
|
||||
install -d ${POSTRMHOOKDIR}
|
||||
install -m 0755 ${KERNEL_HOOKSCRIPTS} ${POSTRMHOOKDIR}
|
||||
install -d ${SHARE_SCRIPTDIR}
|
||||
install -m 0755 ${SHARE_FILES} ${SHARE_SCRIPTDIR}
|
||||
|
||||
|
@ -31,8 +31,6 @@ trap cleanup EXIT INT TERM QUIT
|
||||
|
||||
. /usr/share/pve-kernel-helper/scripts/functions
|
||||
|
||||
BOOT_KVERS="$(boot_kernel_list "$@")"
|
||||
|
||||
potential_esps(){
|
||||
lsblk --list -o PATH,UUID,FSTYPE,PARTTYPE,MOUNTPOINT |
|
||||
awk '$3 == "vfat" && $4 == "c12a7328-f81f-11d2-ba4b-00a0c93ec93b" && $5 == "" {print $1,$2}'
|
||||
@ -152,8 +150,14 @@ case $0:$mode in
|
||||
# time by calling update-grub multiple times on upgrade and removal.
|
||||
# Also run if we have no DEB_MAINT_PARAMS, in order to work with old
|
||||
# kernel packages.
|
||||
*/postinst.d/*:|*/postinst.d/*:configure|*/postrm.d/*:|*/postrm.d/*:remove)
|
||||
update_esps
|
||||
*/postinst.d/*:|*/postinst.d/*:configure)
|
||||
BOOT_KVERS="$(boot_kernel_list "$@")"
|
||||
update_esps
|
||||
;;
|
||||
*/postrm.d/*:|*/postrm.d/*:remove)
|
||||
# no newly installed kernel
|
||||
BOOT_KVERS="$(boot_kernel_list)"
|
||||
update_esps
|
||||
;;
|
||||
esac
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user