linux-image: postrm: Update default symlinks before running hook scripts

Currently the default symlinks may be broken when we run hook scripts,
causing removal to fail if a hook (e.g. lilo) relies on them.
This commit is contained in:
Ben Hutchings 2016-06-04 22:37:09 +01:00
parent e4657e0ec4
commit 586edb84cd
2 changed files with 5 additions and 4 deletions

1
debian/changelog vendored
View File

@ -6,6 +6,7 @@ linux (4.6-1~exp3) UNRELEASED; urgency=medium
linux-update-symlinks command (Closes: #692333, #815850). Drop support
for minimal_swap, no_symlinks, use_hard_links and *_hook parameters in
/etc/kernel-img.conf (Closes: #730073).
* linux-image: postrm: Update default symlinks before running hook scripts
-- Ben Hutchings <ben@decadent.org.uk> Sat, 04 Jun 2016 18:33:11 +0100

View File

@ -3,15 +3,15 @@
version=@abiname@@localversion@
image_path=/boot/@image-stem@-$version
if [ "$1" != upgrade ] && command -v linux-update-symlinks >/dev/null; then
linux-update-symlinks remove $version $image_path
fi
if [ -d /etc/kernel/postrm.d ]; then
DEB_MAINT_PARAMS="$*" run-parts --report --exit-on-error --arg=$version \
--arg=$image_path /etc/kernel/postrm.d
fi
if [ "$1" != upgrade ] && command -v linux-update-symlinks >/dev/null; then
linux-update-symlinks remove $version $image_path
fi
if [ "$1" = purge ]; then
for extra_file in modules.dep modules.isapnpmap modules.pcimap \
modules.usbmap modules.parportmap \