systemd can't be removed from a chroot

Bug #1758438 reported by Steve Langasek on 2018-03-23
This bug affects 1 person
Affects Status Importance Assigned to Milestone
systemd (Ubuntu)
Dimitri John Ledkov
Dimitri John Ledkov

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

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.

Steve Langasek (vorlon) on 2018-03-23
Changed in systemd (Ubuntu):
importance: Undecided → Medium
status: New → Triaged
Dimitri John Ledkov (xnox) wrote :

I guess this is also preventing upgrades in Windows WSL.

Changed in systemd (Ubuntu Bionic):
assignee: nobody → Dimitri John Ledkov (xnox)
milestone: none → ubuntu-18.03
Changed in systemd (Ubuntu Bionic):
status: Triaged → Fix Committed
tags: added: id-5ab94347925723c2b2bf3943
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package systemd - 237-3ubuntu6

systemd (237-3ubuntu6) bionic; urgency=medium

  * Adjust the new dropin test, for v237 systemd.
  * Refresh the keyring patch, to the one merged.

 -- Dimitri John Ledkov <email address hidden> Tue, 27 Mar 2018 13:40:09 +0100

Changed in systemd (Ubuntu Bionic):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers