A working workaround (tested) would be to check for the kernel existence, something like:
if [ -n "$NEWEST_KERNEL" ] && [ ${CURRENT_KERNEL} != ${NEWEST_KERNEL} ]; then
# This can fail when dealing with a chroot see LP: #556653
if [ -e /boot/config-$CURRENT_KERNEL ]; then
update-initramfs -u -k $CURRENT_KERNEL || true
fi
fi
Ideally package should use KVERS and KVERSION within the environment wrt kernel modules.
A working workaround (tested) would be to check for the kernel existence, something like:
if [ -n "$NEWEST_KERNEL" ] && [ ${CURRENT_KERNEL} != ${NEWEST_KERNEL} ]; then $CURRENT_ KERNEL ]; then initramfs -u -k $CURRENT_KERNEL || true
# This can fail when dealing with a chroot see LP: #556653
if [ -e /boot/config-
update-
fi
fi
Ideally package should use KVERS and KVERSION within the environment wrt kernel modules.