Currently the postinst script distinguishes installation vs upgrade by
checking whether its second argument is empty. However, it will only
be empty if the package was *never* installed before, or was purged.
If the package has been installed, then removed, and is now being
installed again, it's seen as an upgrade.
Unfortunately dpkg only tells the preinst script whether or not this
is an upgrade. So create a flag file there, consume it in postinst
and remove it in postrm.
Use the new linux-update-symlinks command for symlink updates.
Drop support for minimal_swap, no_symlinks, use_hard_links and *_hook
parameters in /etc/kernel-img.conf.
Thanks to Aurelien Jarno and Santiago Vila for pointing out the
ischroot command and that it's in an essential package (i.e. doesn't
add a dependency).
This seems to have been a transitional feature for the switch
from kernel-image to linux-image. mkvmlinuz still uses it but
no hook scripts appear to depend on it.