teknoraver / rpms / systemd

Forked from rpms/systemd 3 months ago
Clone

Blame SOURCES/0502-units-make-sure-initrd-cleanup.service-terminates-be.patch

bd1529
From ea425381a675a2ce4d9519d534fe27c1012ac92e Mon Sep 17 00:00:00 2001
bd1529
From: Franck Bui <fbui@suse.com>
bd1529
Date: Mon, 28 Jan 2019 12:07:37 +0100
bd1529
Subject: [PATCH] units: make sure initrd-cleanup.service terminates before
bd1529
 switching to rootfs
bd1529
bd1529
A follow-up for commit a8cb1dc3e0fa81aff.
bd1529
bd1529
Commit a8cb1dc3e0fa81aff made sure that initrd-cleanup.service won't be stopped
bd1529
when initrd-switch-root.target is isolated.
bd1529
bd1529
However even with this change, it might happen that initrd-cleanup.service
bd1529
survives the switch to rootfs (since it has no ordering constraints against
bd1529
initrd-switch-root.target) and is stopped right after when default.target is
bd1529
isolated. This led to initrd-cleanup.service entering in failed state as it
bd1529
happens when oneshot services are stopped.
bd1529
bd1529
This patch along with a8cb1dc3e0fa81aff should fix issue #4343.
bd1529
bd1529
Fixes: #4343
bd1529
(cherry picked from commit e2c7c94ea35fe7e669afb51bfc2251158b522ea5)
bd1529
bd1529
Related: #1657810
bd1529
---
bd1529
 units/initrd-switch-root.target | 2 +-
bd1529
 1 file changed, 1 insertion(+), 1 deletion(-)
bd1529
bd1529
diff --git a/units/initrd-switch-root.target b/units/initrd-switch-root.target
bd1529
index ad82245121..ea4f02618f 100644
bd1529
--- a/units/initrd-switch-root.target
bd1529
+++ b/units/initrd-switch-root.target
bd1529
@@ -15,4 +15,4 @@ Requires=initrd-switch-root.service
bd1529
 Before=initrd-switch-root.service
bd1529
 AllowIsolate=yes
bd1529
 Wants=initrd-udevadm-cleanup-db.service initrd-root-fs.target initrd-fs.target systemd-journald.service initrd-cleanup.service
bd1529
-After=initrd-udevadm-cleanup-db.service initrd-root-fs.target initrd-fs.target emergency.service emergency.target
bd1529
+After=initrd-udevadm-cleanup-db.service initrd-root-fs.target initrd-fs.target emergency.service emergency.target initrd-cleanup.service