From: Harald Hoyer Date: Wed, 11 Jul 2012 14:36:05 +0000 (+0200) Subject: systemd/initrd-switch-root.service: add back "--force" to switch-root X-Git-Tag: 021~23 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2499c305f92cc00474de9790d99abcdc1360d4dd;p=thirdparty%2Fdracut.git systemd/initrd-switch-root.service: add back "--force" to switch-root otherwise systemd does umount /run et.al. --- diff --git a/modules.d/98systemd/initrd-switch-root.service b/modules.d/98systemd/initrd-switch-root.service index bdc45875c..e38f04dcc 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