diff options
author | Jordan K. Hubbard <jkh@FreeBSD.org> | 1996-09-06 06:01:05 +0000 |
---|---|---|
committer | Jordan K. Hubbard <jkh@FreeBSD.org> | 1996-09-06 06:01:05 +0000 |
commit | 7fc4a454e299fc2f1f239987950659902111ab01 (patch) | |
tree | 2f85876e6293ce03cabad196fc6085f709bd6b68 /sbin/swapon | |
parent | 1b455eeb3f2974ca223618ad44831f13ec826774 (diff) | |
download | src-test2-7fc4a454e299fc2f1f239987950659902111ab01.tar.gz src-test2-7fc4a454e299fc2f1f239987950659902111ab01.zip |
Notes
Diffstat (limited to 'sbin/swapon')
-rw-r--r-- | sbin/swapon/swapon.8 | 2 | ||||
-rw-r--r-- | sbin/swapon/swapon.c | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/sbin/swapon/swapon.8 b/sbin/swapon/swapon.8 index 1567607e8ad0..02a6111f213d 100644 --- a/sbin/swapon/swapon.8 +++ b/sbin/swapon/swapon.8 @@ -61,7 +61,7 @@ Normally, the first form is used: All devices marked as ``sw'' swap devices in .Pa /etc/fstab -are made available. +are made available unless their ``noauto'' option is also set. .El .Pp The second form gives individual block devices as given diff --git a/sbin/swapon/swapon.c b/sbin/swapon/swapon.c index 042a853068a2..2a07b534f009 100644 --- a/sbin/swapon/swapon.c +++ b/sbin/swapon/swapon.c @@ -76,6 +76,8 @@ main(int argc, char **argv) while ((fsp = getfsent()) != NULL) { if (strcmp(fsp->fs_type, FSTAB_SW)) continue; + if (strstr(fsp->fs_mntops, "noauto")) + continue; if (add(fsp->fs_spec, 1)) stat = 1; else |