[Bug 1758438] [NEW] systemd can't be removed from a chroot

Steve Langasek steve.langasek at canonical.com
Fri Mar 23 21:30:18 UTC 2018


Public bug reported:

The systemd package has the following code in its prerm:

if [ "$1" = "remove" ] && [ -d /run/systemd/system ]; then
    echo "systemd is the active init system, please switch to another before removing systemd."
    exit 1
fi

However, /run/systemd/system will exist even in a chroot, and an init
system is not needed in a chroot.  The maintainer script should include
a check for whether we're running in a chroot, to allow systemd to be
removed when it's not needed and there is no harm.

** Affects: systemd (Ubuntu)
     Importance: Medium
         Status: Triaged

** Changed in: systemd (Ubuntu)
   Importance: Undecided => Medium

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

-- 
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/1758438

Title:
  systemd can't be removed from a chroot

Status in systemd package in Ubuntu:
  Triaged

Bug description:
  The systemd package has the following code in its prerm:

  if [ "$1" = "remove" ] && [ -d /run/systemd/system ]; then
      echo "systemd is the active init system, please switch to another before removing systemd."
      exit 1
  fi

  However, /run/systemd/system will exist even in a chroot, and an init
  system is not needed in a chroot.  The maintainer script should
  include a check for whether we're running in a chroot, to allow
  systemd to be removed when it's not needed and there is no harm.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1758438/+subscriptions



More information about the foundations-bugs mailing list