]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
systemd: change path of switch-root.conf
authorHarald Hoyer <harald@redhat.com>
Thu, 21 Feb 2013 11:18:21 +0000 (12:18 +0100)
committerHarald Hoyer <harald@redhat.com>
Thu, 21 Feb 2013 11:18:21 +0000 (12:18 +0100)
we do not have to clean it up for /etc/switch-root.conf

modules.d/98systemd/dracut-pre-pivot.sh
modules.d/98systemd/initrd-switch-root.service

index f27d2204a21b7242faa464d05cccaf8f9dcaa5fa..0c259b1bd2de602c22c4fbadb21147d76aa86817 100755 (executable)
@@ -29,12 +29,12 @@ for i in "$(getarg real_init=)" "$(getarg init=)"; do
     __p=$(readlink -f "${NEWROOT}/${i}")
     if [ -x "$__p" ]; then
         INIT="$i"
-        echo "NEWINIT=\"$INIT\"" > /run/initramfs/switch-root.conf
+        echo "NEWINIT=\"$INIT\"" > /etc/switch-root.conf
         break
     fi
 done
 
-echo "NEWROOT=\"$NEWROOT\"" >> /run/initramfs/switch-root.conf
+echo "NEWROOT=\"$NEWROOT\"" >> /etc/switch-root.conf
 
 getarg rd.break -d rdbreak && emergency_shell -n switch_root "Break before switch_root"
 
index bd9fb317a46a9b8cb325def8184f2d7db47a2fcb..e263980a25bca7fbd304e8f0434828c51228e044 100644 (file)
@@ -16,10 +16,9 @@ AllowIsolate=yes
 
 [Service]
 Type=oneshot
-EnvironmentFile=/run/initramfs/switch-root.conf
+EnvironmentFile=/etc/switch-root.conf
 # we have to use "--force" here, otherwise systemd would umount /run
 ExecStart=-/usr/bin/systemctl --no-block --force switch-root ${NEWROOT} ${NEWINIT}
-ExecStopPost=-/bin/rm -f /run/initramfs/switch-root.conf
 StandardInput=null
 StandardOutput=null
 StandardError=null