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