From 1cb64d5ccae3c42d7bad62721b2355b3d4840cd9 Mon Sep 17 00:00:00 2001 From: jkh Date: Fri, 6 Sep 1996 06:01:05 +0000 Subject: Make the noauto flag usable for swap devices too. Closes PR#1542 Submitted-By: David Leonard --- sbin/swapon/swapon.8 | 2 +- sbin/swapon/swapon.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'sbin') diff --git a/sbin/swapon/swapon.8 b/sbin/swapon/swapon.8 index 1567607..02a6111 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 042a853..2a07b53 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 -- cgit v1.1