ryantimwilson / rpms / systemd

Forked from rpms/systemd a month ago
Clone
ff2b41
From 592fde970f4493b202ed0fc035e3f6785a850a55 Mon Sep 17 00:00:00 2001
ff2b41
From: Yu Watanabe <watanabe.yu+github@gmail.com>
ff2b41
Date: Tue, 11 Oct 2016 21:36:14 +0900
ff2b41
Subject: [PATCH] units: add Wants=initrd-cleanup.service to
ff2b41
 initrd-switch-root.target (#4345)
ff2b41
ff2b41
`systemctl isolate initrd-switch-root.target` called by initrd-cleanup.service
ff2b41
kills initrd-cleanup.service itself. Then, initrd-cleanup.service failed and
ff2b41
system goes to emergency shell.
ff2b41
To prevent this problem, this commit adds `Wants=initrd-cleanup.service` to
ff2b41
initrd-switch-root.target.
ff2b41
ff2b41
fixes: #4343.
ff2b41
(cherry picked from commit a8cb1dc3e0fa81affd01c8ed3df35e4c4520a24e)
ff2b41
ff2b41
Related: #1560417
ff2b41
---
ff2b41
 units/initrd-switch-root.target | 2 +-
ff2b41
 1 file changed, 1 insertion(+), 1 deletion(-)
ff2b41
ff2b41
diff --git a/units/initrd-switch-root.target b/units/initrd-switch-root.target
ff2b41
index f34768790b..934d82f667 100644
ff2b41
--- a/units/initrd-switch-root.target
ff2b41
+++ b/units/initrd-switch-root.target
ff2b41
@@ -12,5 +12,5 @@ DefaultDependencies=no
ff2b41
 Requires=initrd-switch-root.service
ff2b41
 Before=initrd-switch-root.service
ff2b41
 AllowIsolate=yes
ff2b41
-Wants=initrd-udevadm-cleanup-db.service initrd-root-fs.target initrd-fs.target systemd-journald.service
ff2b41
+Wants=initrd-udevadm-cleanup-db.service initrd-root-fs.target initrd-fs.target systemd-journald.service initrd-cleanup.service
ff2b41
 After=initrd-udevadm-cleanup-db.service initrd-root-fs.target initrd-fs.target emergency.service emergency.target