From e6db216f0b388cf6533c3d2bb96f91a4d44bc6eb Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Mon, 25 May 2009 16:48:36 +0200 Subject: [PATCH] move /var/lib/nfs/rpc_pipefs to NEWROOT only if directory exists --- modules.d/40nfsroot/nfsroot-cleanup.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/modules.d/40nfsroot/nfsroot-cleanup.sh b/modules.d/40nfsroot/nfsroot-cleanup.sh index 7bdec0ac..4e0d7ad4 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 +