diff options
author | peter <peter@FreeBSD.org> | 2001-09-20 02:18:06 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 2001-09-20 02:18:06 +0000 |
commit | 5f4236f763d963b62b33addbba706018e4b7996d (patch) | |
tree | 765893f3c2a62fcf38a794ebc6ea8c52837a5337 /usr.sbin/nfsd/nfsd.c | |
parent | 0bbcfd5027b99755d085fbcf82c63b6738ff9b48 (diff) | |
download | FreeBSD-src-5f4236f763d963b62b33addbba706018e4b7996d.zip FreeBSD-src-5f4236f763d963b62b33addbba706018e4b7996d.tar.gz |
Deal with nfs server module changes for autoloading.
Diffstat (limited to 'usr.sbin/nfsd/nfsd.c')
-rw-r--r-- | usr.sbin/nfsd/nfsd.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/usr.sbin/nfsd/nfsd.c b/usr.sbin/nfsd/nfsd.c index eadaf8d..a00dc88 100644 --- a/usr.sbin/nfsd/nfsd.c +++ b/usr.sbin/nfsd/nfsd.c @@ -132,18 +132,13 @@ main(argc, argv, envp) int bindhostc = 0, bindanyflag, rpcbreg, rpcbregcnt; char **bindhost = NULL; pid_t pid; - struct vfsconf vfc; int error; - error = getvfsbyname("nfs", &vfc); - if (error && vfsisloadable("nfs")) { - if (vfsload("nfs")) - err(1, "vfsload(nfs)"); - endvfsent(); /* flush cache */ - error = getvfsbyname("nfs", &vfc); + if (modfind("nfsserver") < 0) { + /* Not present in kernel, try loading it */ + if (kldload("nfsserver") < 0 || modfind("nfsserver") < 0) + errx(1, "NFS serveris not available"); } - if (error) - errx(1, "NFS is not available in the running kernel"); nfsdcnt = DEFNFSDCNT; unregister = reregister = tcpflag = 0; |