diff options
-rw-r--r-- | sbin/mount/mntopts.h | 2 | ||||
-rw-r--r-- | sbin/mount/mount.c | 9 | ||||
-rw-r--r-- | sbin/mount_ifs/mntopts.h | 2 | ||||
-rw-r--r-- | sbin/mount_ifs/mount.c | 9 |
4 files changed, 16 insertions, 6 deletions
diff --git a/sbin/mount/mntopts.h b/sbin/mount/mntopts.h index 0e7ab24..84e2943 100644 --- a/sbin/mount/mntopts.h +++ b/sbin/mount/mntopts.h @@ -42,6 +42,7 @@ struct mntopt { /* User-visible MNT_ flags. */ #define MOPT_ASYNC { "async", 0, MNT_ASYNC, 0 } +#define MOPT_NOAUTO { "auto", 1, MNT_NOAUTO, 0 } #define MOPT_NODEV { "dev", 1, MNT_NODEV, 0 } #define MOPT_NOEXEC { "exec", 1, MNT_NOEXEC, 0 } #define MOPT_NOSUID { "suid", 1, MNT_NOSUID, 0 } @@ -68,6 +69,7 @@ struct mntopt { /* Standard options which all mounts can understand. */ #define MOPT_STDOPTS \ MOPT_FSTAB_COMPAT, \ + MOPT_NOAUTO, \ MOPT_NODEV, \ MOPT_NOEXEC, \ MOPT_NOSUID, \ diff --git a/sbin/mount/mount.c b/sbin/mount/mount.c index 2121ae1..bcf65a3 100644 --- a/sbin/mount/mount.c +++ b/sbin/mount/mount.c @@ -84,6 +84,7 @@ static struct opt { { MNT_ASYNC, "asynchronous" }, { MNT_EXPORTED, "NFS exported" }, { MNT_LOCAL, "local" }, + { MNT_NOAUTO, "noauto" }, { MNT_NODEV, "nodev" }, { MNT_NOEXEC, "noexec" }, { MNT_NOSUID, "nosuid" }, @@ -166,10 +167,12 @@ main(argc, argv) continue; if (badvfsname(fs->fs_vfstype, vfslist)) continue; + if (!strstr(fs->fs_mntops, "noauto")) { if (mountfs(fs->fs_vfstype, fs->fs_spec, - fs->fs_file, init_flags, options, - fs->fs_mntops)) - rval = 1; + fs->fs_file, init_flags, options, + fs->fs_mntops)) + rval = 1; + } } else { if ((mntsize = getmntinfo(&mntbuf, MNT_NOWAIT)) == 0) diff --git a/sbin/mount_ifs/mntopts.h b/sbin/mount_ifs/mntopts.h index 0e7ab24..84e2943 100644 --- a/sbin/mount_ifs/mntopts.h +++ b/sbin/mount_ifs/mntopts.h @@ -42,6 +42,7 @@ struct mntopt { /* User-visible MNT_ flags. */ #define MOPT_ASYNC { "async", 0, MNT_ASYNC, 0 } +#define MOPT_NOAUTO { "auto", 1, MNT_NOAUTO, 0 } #define MOPT_NODEV { "dev", 1, MNT_NODEV, 0 } #define MOPT_NOEXEC { "exec", 1, MNT_NOEXEC, 0 } #define MOPT_NOSUID { "suid", 1, MNT_NOSUID, 0 } @@ -68,6 +69,7 @@ struct mntopt { /* Standard options which all mounts can understand. */ #define MOPT_STDOPTS \ MOPT_FSTAB_COMPAT, \ + MOPT_NOAUTO, \ MOPT_NODEV, \ MOPT_NOEXEC, \ MOPT_NOSUID, \ diff --git a/sbin/mount_ifs/mount.c b/sbin/mount_ifs/mount.c index 2121ae1..bcf65a3 100644 --- a/sbin/mount_ifs/mount.c +++ b/sbin/mount_ifs/mount.c @@ -84,6 +84,7 @@ static struct opt { { MNT_ASYNC, "asynchronous" }, { MNT_EXPORTED, "NFS exported" }, { MNT_LOCAL, "local" }, + { MNT_NOAUTO, "noauto" }, { MNT_NODEV, "nodev" }, { MNT_NOEXEC, "noexec" }, { MNT_NOSUID, "nosuid" }, @@ -166,10 +167,12 @@ main(argc, argv) continue; if (badvfsname(fs->fs_vfstype, vfslist)) continue; + if (!strstr(fs->fs_mntops, "noauto")) { if (mountfs(fs->fs_vfstype, fs->fs_spec, - fs->fs_file, init_flags, options, - fs->fs_mntops)) - rval = 1; + fs->fs_file, init_flags, options, + fs->fs_mntops)) + rval = 1; + } } else { if ((mntsize = getmntinfo(&mntbuf, MNT_NOWAIT)) == 0) |