Comment 11 for bug 556653

Revision history for this message
Luigi Capriotti (l.capriotti) wrote :

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.