summaryrefslogtreecommitdiffstats
path: root/usr.sbin/mount_portalfs
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/mount_portalfs
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/mount_portalfs')
-rw-r--r--usr.sbin/mount_portalfs/mount_portalfs.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/usr.sbin/mount_portalfs/mount_portalfs.c b/usr.sbin/mount_portalfs/mount_portalfs.c
index ae5345d..d88a38d 100644
--- a/usr.sbin/mount_portalfs/mount_portalfs.c
+++ b/usr.sbin/mount_portalfs/mount_portalfs.c
@@ -94,6 +94,7 @@ main(argc, argv)
char *mountpt;
int mntflags = 0;
char tag[32];
+ struct vfsconf *vfc;
qelem q;
int rc;
@@ -156,7 +157,15 @@ main(argc, argv)
sprintf(tag, "portal:%d", getpid());
args.pa_config = tag;
- rc = mount(MOUNT_PORTAL, mountpt, mntflags, &args);
+ vfc = getvfsbyname("portal");
+ if(!vfc && vfsisloadable("portal")) {
+ if(vfsload("portal"))
+ err(1, "vfsload(portal)");
+ endvfsent(); /* flush cache */
+ vfc = getvfsbyname("portal");
+ }
+
+ rc = mount(vfc ? vfc->vfc_index : MOUNT_PORTAL, mountpt, mntflags, &args);
if (rc < 0)
err(1, NULL);
OpenPOWER on IntegriCloud