- $PREFIX/bin/rpcinfo -u localhost nfs 3 > /dev/null 2>&1 ||
- RPCMOUNTDOPTS="$RPCMOUNDOPTS --no-nfs-version 3"
+
+ # make sure 127.0.0.1 is a valid source for requests
+ ClearAddr=
+ if [ -f /proc/net/rpc/auth.unix.ip/channel ]
+ then
+ fgrep -qs 127.0.0.1 /proc/net/rpc/auth.unix.ip/content || {
+ echo "nfsd 127.0.0.1 2147483647 localhost" >/proc/net/rpc/auth.unix.ip/channel
+ ClearAddr=yes
+ }
+ fi
+
+ $PREFIX/bin/rpcinfo -u localhost nfs 3 >/dev/null 2>&1 ||
+ RPCMOUNTDOPTS="$RPCMOUNTDOPTS --no-nfs-version 3"
+
+ [ -z "$ClearAddr" ] || echo "nfsd 127.0.0.1 1" >/proc/net/rpc/auth.unix.ip/channel
+