From 115a35c175ac912b89308261f461421040e3bdd1 Mon Sep 17 00:00:00 2001 From: Philippe Seewer Date: Tue, 16 Jun 2009 10:31:29 +0200 Subject: [PATCH] nfsroot: statd is only needed for nfs4 rpc.statd is only needed for NFSv4, because it's required for locking. We don't support locking for NFSv2/3, so start it only if we are mount from NFSv4. --- modules.d/95nfs/nfsroot | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules.d/95nfs/nfsroot b/modules.d/95nfs/nfsroot index 23fc3aa..d0189be 100755 --- a/modules.d/95nfs/nfsroot +++ b/modules.d/95nfs/nfsroot @@ -65,12 +65,10 @@ incol2 /proc/filesystems nfs4 || modprobe nfs || exit 1 # XXX don't forget to move /var/lib/nfs/rpc_pipefs to new / -# Start rpcbind and rpc.statd as mount won't let us use locks on a NFSv4 -# filesystem without talking to them, even though they are unneeded +# Start rpcbind or rpcbind # XXX occasionally saw 'rpcbind: fork failed: No such device' -- why? [ -x /sbin/portmap ] && [ -z "$(pidof portmap)" ] && portmap [ -x /sbin/rpcbind ] && [ -z "$(pidof rpcbind)" ] && rpcbind -[ -n "$(pidof rpc.statd)" ] || rpc.statd # XXX should I do rpc.idmapd here, or wait and start in the new root # XXX waiting assumes root can read everything it needs right up until @@ -79,6 +77,8 @@ incol2 /proc/filesystems nfs4 || modprobe nfs || exit 1 # XXX really, want to retry in a loop I think, but not here... if [ "$nfsver" = "nfs4" ]; then + [ -n "$(pidof rpc.statd)" ] || rpc.statd + # XXX really needed? Do we need non-root users before we start it in # XXX the real root image? if [ -z "$(pidof rpc.idmapd)" ]; then -- 2.7.4