These versions recently removed dh_installinit which provided this handy line of code:
in .prerm:
if [ -z "${DPKG_ROOT:-}" ] && [ "$1" = remove ] && [ -x "/etc/init.d/multipath-tools" ] ; then
invoke-rc.d multipath-tools stop || exit 1
fi
if [ -z "${DPKG_ROOT:-}" ] && [ -d /run/systemd/system ]; then
deb-systemd-invoke stop 'multipathd.socket' >/dev/null || true
fi
So, when transitioning from a package that has dh_installinit and these new versions only using systemd, only the socket was stopped, and not the service. This caused the old service to persist after an upgrade.
This is not an issue if the user has needrestart and sees the interactive prompt, but that is not something that should be relied on.
The fix is relatively simple, add logic in postinst to restart multipathd.service when upgrading.
This is present in both
(lunar) 0.8.8-1ubuntu2.1 22.04.2
(jammy) 0.8.8-1ubuntu1.
These versions recently removed dh_installinit which provided this handy line of code:
in .prerm: d/multipath- tools" ] ; then systemd- invoke stop 'multipathd.socket' >/dev/null || true
if [ -z "${DPKG_ROOT:-}" ] && [ "$1" = remove ] && [ -x "/etc/init.
invoke-rc.d multipath-tools stop || exit 1
fi
if [ -z "${DPKG_ROOT:-}" ] && [ -d /run/systemd/system ]; then
deb-
fi
So, when transitioning from a package that has dh_installinit and these new versions only using systemd, only the socket was stopped, and not the service. This caused the old service to persist after an upgrade.
This is not an issue if the user has needrestart and sees the interactive prompt, but that is not something that should be relied on.
The fix is relatively simple, add logic in postinst to restart multipathd.service when upgrading.