From: Philippe Seewer Date: Tue, 16 Jun 2009 08:31:29 +0000 (+0200) Subject: nfsroot: statd is only needed for nfs4 X-Git-Tag: 0.1~55 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=115a35c175ac912b89308261f461421040e3bdd1;p=thirdparty%2Fdracut.git 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. --- diff --git a/modules.d/95nfs/nfsroot b/modules.d/95nfs/nfsroot index 23fc3aa8e..d0189be3c 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