From: Harald Hoyer Date: Wed, 27 May 2009 12:21:52 +0000 (+0200) Subject: better handling of mount moving rpc_pipefs X-Git-Tag: 0.1~166 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ee0deb9918f7cce2553ccfd40b9fc51d8f5dfce8;p=thirdparty%2Fdracut.git better handling of mount moving rpc_pipefs --- diff --git a/modules.d/40nfsroot/nfsroot-cleanup.sh b/modules.d/40nfsroot/nfsroot-cleanup.sh index 4e0d7ad43..b8f3a2f2d 100644 --- a/modules.d/40nfsroot/nfsroot-cleanup.sh +++ b/modules.d/40nfsroot/nfsroot-cleanup.sh @@ -6,11 +6,14 @@ pid=$(pidof rpc.statd) pid=$(pidof rpcbind) [ -n "$pid" ] && kill $pid -mkdir -p +if grep -q rpc_pipefs /proc/mounts; then + # try to create the destination directory + [ -d $NEWROOT/var/lib/nfs/rpc_pipefs ] || mkdir -p $NEWROOT/var/lib/nfs/rpc_pipefs 2>/dev/null -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 + 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 fi