]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
units: make sure initrd-cleanup.service terminates before switching to rootfs
authorFranck Bui <fbui@suse.com>
Mon, 28 Jan 2019 11:07:37 +0000 (12:07 +0100)
committerLennart Poettering <lennart@poettering.net>
Mon, 28 Jan 2019 12:41:28 +0000 (13:41 +0100)
A follow-up for commit a8cb1dc3e0fa81aff.

Commit a8cb1dc3e0fa81aff made sure that initrd-cleanup.service won't be stopped
when initrd-switch-root.target is isolated.

However even with this change, it might happen that initrd-cleanup.service
survives the switch to rootfs (since it has no ordering constraints against
initrd-switch-root.target) and is stopped right after when default.target is
isolated. This led to initrd-cleanup.service entering in failed state as it
happens when oneshot services are stopped.

This patch along with a8cb1dc3e0fa81aff should fix issue #4343.

Fixes: #4343
units/initrd-switch-root.target

index ad8224512152921f25520967e8bba3f232ad5c48..ea4f02618f1c175460cf3d78a4fd5a6994790505 100644 (file)
@@ -15,4 +15,4 @@ Requires=initrd-switch-root.service
 Before=initrd-switch-root.service
 AllowIsolate=yes
 Wants=initrd-udevadm-cleanup-db.service initrd-root-fs.target initrd-fs.target systemd-journald.service initrd-cleanup.service
-After=initrd-udevadm-cleanup-db.service initrd-root-fs.target initrd-fs.target emergency.service emergency.target
+After=initrd-udevadm-cleanup-db.service initrd-root-fs.target initrd-fs.target emergency.service emergency.target initrd-cleanup.service