]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
move /var/lib/nfs/rpc_pipefs to NEWROOT only if directory exists
authorHarald Hoyer <harald@redhat.com>
Mon, 25 May 2009 14:48:36 +0000 (16:48 +0200)
committerHarald Hoyer <harald@redhat.com>
Mon, 25 May 2009 14:48:36 +0000 (16:48 +0200)
modules.d/40nfsroot/nfsroot-cleanup.sh

index 7bdec0acf68488dd6759fea60a0ed6aa8a8874d1..4e0d7ad43b52521e88d8fd331a107c888a8b6e3a 100644 (file)
@@ -6,4 +6,11 @@ pid=$(pidof rpc.statd)
 pid=$(pidof rpcbind)
 [ -n "$pid" ] && kill $pid
 
-mount --move /var/lib/nfs/rpc_pipefs $NEWROOT/var/lib/nfs/rpc_pipefs
+mkdir -p 
+
+if [ -d $NEWROOT/var/lib/nfs/rpc_pipefs ]; then
+    mount --move /var/lib/nfs/rpc_pipefs $NEWROOT/var/lib/nfs/rpc_pipefs
+else
+    umount /var/lib/nfs/rpc_pipefs
+fi
+