Blame 0083-systemd-initrd-switch-root.service-add-back-force-to.patch

Harald Hoyer 43b211
From 2499c305f92cc00474de9790d99abcdc1360d4dd Mon Sep 17 00:00:00 2001
Harald Hoyer 43b211
From: Harald Hoyer <harald@redhat.com>
Harald Hoyer 43b211
Date: Wed, 11 Jul 2012 16:36:05 +0200
Harald Hoyer 43b211
Subject: [PATCH] systemd/initrd-switch-root.service: add back "--force" to
Harald Hoyer 43b211
 switch-root
Harald Hoyer 43b211
Harald Hoyer 43b211
otherwise systemd does umount /run et.al.
Harald Hoyer 43b211
---
Harald Hoyer 43b211
 modules.d/98systemd/initrd-switch-root.service |    4 +++-
Harald Hoyer 43b211
 1 file changed, 3 insertions(+), 1 deletion(-)
Harald Hoyer 43b211
Harald Hoyer 43b211
diff --git a/modules.d/98systemd/initrd-switch-root.service b/modules.d/98systemd/initrd-switch-root.service
Harald Hoyer 43b211
index bdc4587..e38f04d 100644
Harald Hoyer 43b211
--- a/modules.d/98systemd/initrd-switch-root.service
Harald Hoyer 43b211
+++ b/modules.d/98systemd/initrd-switch-root.service
Harald Hoyer 43b211
@@ -16,8 +16,10 @@ Before=systemd-journal-flush.service
Harald Hoyer 43b211
 [Service]
Harald Hoyer 43b211
 Type=oneshot
Harald Hoyer 43b211
 EnvironmentFile=/run/initramfs/switch-root.conf
Harald Hoyer 43b211
-ExecStart=/usr/bin/systemctl switch-root ${NEWROOT} ${NEWINIT}
Harald Hoyer 43b211
+# we have to use "--force" here, otherwise systemd would umount /run
Harald Hoyer 43b211
+ExecStart=/usr/bin/systemctl --force switch-root ${NEWROOT} ${NEWINIT}
Harald Hoyer 43b211
 ExecStopPost=-/usr/bin/systemctl stop systemd-journald.service
Harald Hoyer 43b211
+ExecStopPost=-/bin/rm -f /run/initramfs/switch-root.conf
Harald Hoyer 43b211
 StandardInput=null
Harald Hoyer 43b211
 StandardOutput=null
Harald Hoyer 43b211
 StandardError=null