move /var/lib/nfs/rpc_pipefs to NEWROOT only if directory exists

master
Harald Hoyer 2009-05-25 16:48:36 +02:00
parent 4c715d64b2
commit e6db216f0b
1 changed files with 8 additions and 1 deletions

View 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