[Xenial][udev] postinst script should use "invoke-rc.d stop" instead of "systemctl stop"
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
systemd (Ubuntu) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
In order to respect the local initscript policy layer that may be present in /usr/sbin/
This direct systemctl call can be found in the handle_
handle_
if dpkg --compare-versions "$2" lt "204-1"; then
if [ -d /run/systemd/system ]; then
systemctl stop udev.service udev-control.socket udev-kernel.socket >/dev/null 2>&1 || true
fi
fi
}
Using "systemctl stop" during unattended-upgrades in shutdown mode hangs and leaves the dpkg database in a broken state after reboot. Using a local initscript policy layer that prevents start/stop/restart actions on this case is a way to prevent those hangs but maintainer scripts have to use invoke-rc.d instead of direct systemctl calls.
please reopen if this is still an issue