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
Touch seeded packages, 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

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to