]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
systemd/dracut-pre-pivot: run for /dev/{nfs,root} and cleanup /dev/nfs
authorHarald Hoyer <harald@redhat.com>
Wed, 5 Feb 2014 12:08:54 +0000 (13:08 +0100)
committerHarald Hoyer <harald@redhat.com>
Wed, 5 Feb 2014 12:08:54 +0000 (13:08 +0100)
dracut-pre-pivot was not cleaning up /dev/nfs and did not run to clean
up /dev/root.

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

index dd4e49b44dc5d1088c4f7da87d41f3ef3aeba7cd..6db1f2c0771aa5e72a93c3782f88453b7b91a7ba 100644 (file)
@@ -19,6 +19,8 @@ ConditionDirectoryNotEmpty=|/lib/dracut/hooks/cleanup
 ConditionKernelCommandLine=|rd.break=pre-pivot
 ConditionKernelCommandLine=|rd.break=cleanup
 ConditionKernelCommandLine=|rd.break
+ConditionPathExists=|/dev/root
+ConditionPathExists=|/dev/nfs
 
 [Service]
 Environment=DRACUT_SYSTEMD=1
index 8c7554eadaa35bd3491b5f4c218cdefc81afca3e..e62a1cecb6eb83d30fbcdbe4e62c35d102767745 100755 (executable)
@@ -24,5 +24,6 @@ getarg rd.break -d rdbreak && emergency_shell -n switch_root "Break before switc
 
 # remove helper symlink
 [ -h /dev/root ] && rm -f -- /dev/root
+[ -h /dev/nfs ] && rm -f -- /dev/nfs
 
 exit 0