+2000-11-09 H.J. Lu <hjl@lucon.org>
+
+ * etc/redhat/nfs.init (start): Pass --no-tcp to mountd if
+ TCP is not supported by kernel.
+
+ * support/nfs/rpcmisc.c (rpc_init): Don't set _rpcfdtype to 0.
+
+ * utils/mountd/mountd.c (longopts): Add "-n/--no-tcp".
+ (main): Set to _rpcfdtype to SOCK_DGRAM for "-n/--no-tcp".
+
+ * utils/mountd/mountd.man: Updated for "-n/--no-tcp".
+
2000-10-24 Lon Hohberger <hohberger@missioncriticallinux.com>
* utils/statd/callback.c: Fix bug preventing callbacks to local lockd.
RPCMOUNTDOPTS="--no-nfs-version 3"
fi
+ # Let's see if we support NFS version 3.
+ /usr/sbin/rpcinfo -p localhost | grep nfs | grep tcp &>/dev/null
+ if [ $? -ne 0 ]; then
+ RPCMOUNTDOPTS="$RPCMOUNTDOPTS --no-tcp"
+ fi
+
echo -n "Starting NFS mountd: "
daemon rpc.mountd $RPCMOUNTDOPTS
echo
asize = sizeof(saddr);
sock = 0;
- _rpcfdtype = 0;
if (getsockname(0, (struct sockaddr *) &saddr, &asize) == 0) {
int ssize = sizeof (int);
+ _rpcfdtype = 0;
if (saddr.sin_family != AF_INET)
xlog(L_FATAL, "init: stdin is bound to non-inet addr");
if (getsockopt(0, SOL_SOCKET, SO_TYPE,
{ "no-nfs-version", 1, 0, 'N' },
{ "version", 0, 0, 'v' },
{ "port", 1, 0, 'p' },
+ { "no-tcp", 0, 0, 'n' },
{ NULL, 0, 0, 0 }
};
case 'N':
nfs_version &= ~(1 << (atoi (optarg) - 1));
break;
+ case 'n':
+ _rpcfdtype = SOCK_DGRAM;
+ break;
case 'V':
nfs_version |= 1 << (atoi (optarg) - 1);
break;
"Usage: %s [-Fhnv] [-d kind] [-f exports-file] [-V version]\n"
" [-N version] [--debug kind] [-p|--port port] [--help] [--version]\n"
" [--exports-file=file] [--nfs-version version]\n"
-" [--no-nfs-version version]\n", prog);
+" [--no-nfs-version version] [--no-tcp]\n", prog);
exit(n);
}
must be invoked with the option
.B "\-\-no-nfs-version 3" .
.TP
+.B \-n " or " \-\-no-tcp
+Don't advertise TCP for mount.
+.TP
.B \-P
Ignored (compatibility with unfsd??).
.TP