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

Dan Streetman 1803530 at bugs.launchpad.net
Wed Jun 30 22:14:51 UTC 2021


please reopen if this is still an issue

** Changed in: systemd (Ubuntu)
       Status: New => Invalid

-- 
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:
  Invalid

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