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/mount_nfs/mount_nfs.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/mount_nfs/mount_nfs.c')
-rw-r--r-- | sbin/mount_nfs/mount_nfs.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/sbin/mount_nfs/mount_nfs.c b/sbin/mount_nfs/mount_nfs.c index cd4234b..900f22e 100644 --- a/sbin/mount_nfs/mount_nfs.c +++ b/sbin/mount_nfs/mount_nfs.c @@ -148,6 +148,7 @@ main(argc, argv) int mntflags, i, nfssvc_flag, num; char *name, *p, *spec; int error = 0; + struct vfsconf *vfc; #ifdef KERBEROS uid_t last_ruid; #endif @@ -294,7 +295,16 @@ main(argc, argv) if (!getnfsargs(spec, nfsargsp)) exit(1); - if (mount(MOUNT_NFS, name, mntflags, nfsargsp)) + + vfc = getvfsbyname("nfs"); + if(!vfc && vfsisloadable("nfs")) { + if(vfsload("nfs")) + err(1, "vfsload(nfs)"); + endvfsent(); /* flush cache */ + vfc = getvfsbyname("nfs"); + } + + if (mount(vfc ? vfc->vfc_index : MOUNT_NFS, name, mntflags, nfsargsp)) err(1, "%s", name); if (nfsargsp->flags & (NFSMNT_NQNFS | NFSMNT_KERB)) { if ((opflags & ISBGRND) == 0) { |