diff options
author | wollman <wollman@FreeBSD.org> | 1994-09-22 22:17:02 +0000 |
---|---|---|
committer | wollman <wollman@FreeBSD.org> | 1994-09-22 22:17:02 +0000 |
commit | eeef7952c3836dd1eb5e994695d5c745b6b51784 (patch) | |
tree | eae3d93fb9be635a1496c02de15cdef92b491f86 /sbin/nfsiod/nfsiod.c | |
parent | d4b42cfe457790ba8db25f68e68f7c056ddc69b5 (diff) | |
download | FreeBSD-src-eeef7952c3836dd1eb5e994695d5c745b6b51784.zip FreeBSD-src-eeef7952c3836dd1eb5e994695d5c745b6b51784.tar.gz |
Automatically load NFS and a bevy of other filesystems.
Diffstat (limited to 'sbin/nfsiod/nfsiod.c')
-rw-r--r-- | sbin/nfsiod/nfsiod.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/sbin/nfsiod/nfsiod.c b/sbin/nfsiod/nfsiod.c index b742fdc..d066329 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 |