From: Harald Hoyer Date: Mon, 25 May 2009 14:48:36 +0000 (+0200) Subject: move /var/lib/nfs/rpc_pipefs to NEWROOT only if directory exists X-Git-Tag: 0.1~185 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e6db216f0b388cf6533c3d2bb96f91a4d44bc6eb;p=thirdparty%2Fdracut.git move /var/lib/nfs/rpc_pipefs to NEWROOT only if directory exists --- diff --git a/modules.d/40nfsroot/nfsroot-cleanup.sh b/modules.d/40nfsroot/nfsroot-cleanup.sh index 7bdec0acf..4e0d7ad43 100644 --- a/modules.d/40nfsroot/nfsroot-cleanup.sh +++ b/modules.d/40nfsroot/nfsroot-cleanup.sh @@ -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 +