summaryrefslogtreecommitdiffstats
path: root/usr.sbin/nfsd/nfsd.c
diff options
context:
space:
mode:
authorwollman <wollman@FreeBSD.org>1994-09-22 22:17:02 +0000
committerwollman <wollman@FreeBSD.org>1994-09-22 22:17:02 +0000
commiteeef7952c3836dd1eb5e994695d5c745b6b51784 (patch)
treeeae3d93fb9be635a1496c02de15cdef92b491f86 /usr.sbin/nfsd/nfsd.c
parentd4b42cfe457790ba8db25f68e68f7c056ddc69b5 (diff)
downloadFreeBSD-src-eeef7952c3836dd1eb5e994695d5c745b6b51784.zip
FreeBSD-src-eeef7952c3836dd1eb5e994695d5c745b6b51784.tar.gz
Automatically load NFS and a bevy of other filesystems.
Diffstat (limited to 'usr.sbin/nfsd/nfsd.c')
-rw-r--r--usr.sbin/nfsd/nfsd.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/usr.sbin/nfsd/nfsd.c b/usr.sbin/nfsd/nfsd.c
index 8e2d14c..9d4d226 100644
--- a/usr.sbin/nfsd/nfsd.c
+++ b/usr.sbin/nfsd/nfsd.c
@@ -144,6 +144,18 @@ main(argc, argv, envp)
int nfsdcnt, nfssvc_flag, on, reregister, sock, tcpflag, tcpsock;
int tp4cnt, tp4flag, tp4sock, tpipcnt, tpipflag, tpipsock, udpflag;
char *cp, **cpp;
+ struct vfsconf *vfc;
+
+ vfc = getvfsbyname("nfs");
+ if(!vfc && vfsisloadable("nfs")) {
+ if(vfsload("nfs"))
+ err(1, "vfsload(nfs)");
+ endvfsent(); /* flush cache */
+ vfc = getvfsbyname("nfs"); /* probably unnecessary */
+ }
+ if(!vfc) {
+ errx(1, "NFS is not available in the running kernel");
+ }
/* Save start and extent of argv for setproctitle. */
Argv = argv;
OpenPOWER on IntegriCloud