aboutsummaryrefslogtreecommitdiffstats
path: root/sbin/nfsiod/nfsiod.c
diff options
context:
space:
mode:
authorGarrett Wollman <wollman@FreeBSD.org>1994-09-22 22:17:02 +0000
committerGarrett Wollman <wollman@FreeBSD.org>1994-09-22 22:17:02 +0000
commitd599144d24b887e1736c0e5470d56248bcc45160 (patch)
treeeae3d93fb9be635a1496c02de15cdef92b491f86 /sbin/nfsiod/nfsiod.c
parent42477d75d038de2ef2d8cbb77644f63f56d2076f (diff)
downloadsrc-d599144d24b887e1736c0e5470d56248bcc45160.tar.gz
src-d599144d24b887e1736c0e5470d56248bcc45160.zip
Automatically load NFS and a bevy of other filesystems.
Notes
Notes: svn path=/head/; revision=2999
Diffstat (limited to 'sbin/nfsiod/nfsiod.c')
-rw-r--r--sbin/nfsiod/nfsiod.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/sbin/nfsiod/nfsiod.c b/sbin/nfsiod/nfsiod.c
index b742fdc114f6..d066329ab4d9 100644
--- a/sbin/nfsiod/nfsiod.c
+++ b/sbin/nfsiod/nfsiod.c
@@ -49,6 +49,7 @@ static char sccsid[] = "@(#)nfsiod.c 8.3 (Berkeley) 2/22/94";
#include <sys/syslog.h>
#include <sys/ucred.h>
#include <sys/wait.h>
+#include <sys/mount.h>
#include <nfs/nfsv2.h>
#include <nfs/nfs.h>
@@ -83,6 +84,19 @@ main(argc, argv)
char *argv[];
{
int ch, num_servers;
+ struct vfsconf *vfc;
+
+ vfc = getvfsbyname("nfs");
+ if(!vfc && vfsisloadable("nfs")) {
+ if(vfsload("nfs"))
+ err(1, "vfsload(nfs)");
+ endvfsent(); /* flush cache */
+ vfc = getvfsbyname("nfs");
+ }
+
+ if(!vfc) {
+ errx(1, "NFS support is not available in the running kernel");
+ }
#define MAXNFSDCNT 20
#define DEFNFSDCNT 1