[Bug 1803530] [NEW] [Xenial][udev] postinst script should use "invoke-rc.d stop" instead of "systemctl stop"
Guillaume Penin
guillaume.penin at sncf.fr
Thu Nov 15 11:35:49 UTC 2018
Public bug reported:
In order to respect the local initscript policy layer that may be
present in /usr/sbin/policy-rc.d, the postinst script of the udev
package should use "invoke-rc.d stop" instead of "systemctl stop".
This direct systemctl call can be found in the handle_service_rename()
function :
handle_service_rename() {
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.
** Affects: systemd (Ubuntu)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to systemd in Ubuntu.
https://bugs.launchpad.net/bugs/1803530
Title:
[Xenial][udev] postinst script should use "invoke-rc.d stop" instead
of "systemctl stop"
Status in systemd package in Ubuntu:
New
Bug description:
In order to respect the local initscript policy layer that may be
present in /usr/sbin/policy-rc.d, the postinst script of the udev
package should use "invoke-rc.d stop" instead of "systemctl stop".
This direct systemctl call can be found in the handle_service_rename()
function :
handle_service_rename() {
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.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1803530/+subscriptions
More information about the foundations-bugs
mailing list