[Xenial][udev] postinst script should use "invoke-rc.d stop" instead of "systemctl stop"

Bug #1803530 reported by Guillaume Penin
6
This bug affects 1 person
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/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.

Revision history for this message
Dan Streetman (ddstreet) wrote :

please reopen if this is still an issue

Changed in systemd (Ubuntu):
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.