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:
parent
e4657e0ec4
commit
586edb84cd
|
@ -6,6 +6,7 @@ linux (4.6-1~exp3) UNRELEASED; urgency=medium
|
||||||
linux-update-symlinks command (Closes: #692333, #815850). Drop support
|
linux-update-symlinks command (Closes: #692333, #815850). Drop support
|
||||||
for minimal_swap, no_symlinks, use_hard_links and *_hook parameters in
|
for minimal_swap, no_symlinks, use_hard_links and *_hook parameters in
|
||||||
/etc/kernel-img.conf (Closes: #730073).
|
/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
|
-- Ben Hutchings <ben@decadent.org.uk> Sat, 04 Jun 2016 18:33:11 +0100
|
||||||
|
|
||||||
|
|
|
@ -3,15 +3,15 @@
|
||||||
version=@abiname@@localversion@
|
version=@abiname@@localversion@
|
||||||
image_path=/boot/@image-stem@-$version
|
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
|
if [ -d /etc/kernel/postrm.d ]; then
|
||||||
DEB_MAINT_PARAMS="$*" run-parts --report --exit-on-error --arg=$version \
|
DEB_MAINT_PARAMS="$*" run-parts --report --exit-on-error --arg=$version \
|
||||||
--arg=$image_path /etc/kernel/postrm.d
|
--arg=$image_path /etc/kernel/postrm.d
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$1" != upgrade ] && command -v linux-update-symlinks >/dev/null; then
|
|
||||||
linux-update-symlinks remove $version $image_path
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$1" = purge ]; then
|
if [ "$1" = purge ]; then
|
||||||
for extra_file in modules.dep modules.isapnpmap modules.pcimap \
|
for extra_file in modules.dep modules.isapnpmap modules.pcimap \
|
||||||
modules.usbmap modules.parportmap \
|
modules.usbmap modules.parportmap \
|
||||||
|
|
Loading…
Reference in New Issue