. /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}'
# 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