On Sat, Apr 16, 2011 at 05:48:03PM +0100, Jason McIntyre wrote:
> On Sat, Apr 16, 2011 at 12:11:19PM -0400, Kenneth R Westerback wrote:
> > If we are trying to create a faux fstab for a disk, it should include
> > any swap partitions on the disk. Other than general aesthetic appeal,
> > this will help the install script.
> > 
> > Anybody know of reasons not to included the swap partitions in -F|-f
> > output?
> > 
> 
> only that traditionally it seems the first swap partition has not been
> listed in fstab. swapon(8) even added a note about this. i don;t know
> whether it makes sense to remove that note, or somehow word it
> differently. or maybe it makes no odds...
> 
> notice that in fstab(5) we went to great lengths to not list a
> /dev/sd0b. however an mfs entry was added.
> 
> jmc

My suggested man page tweaks are below.

.... Ken

Index: share/man/man5/fstab.5
===================================================================
RCS file: /cvs/src/share/man/man5/fstab.5,v
retrieving revision 1.44
diff -u -p -r1.44 fstab.5
--- share/man/man5/fstab.5      28 Sep 2010 17:37:20 -0000      1.44
+++ share/man/man5/fstab.5      16 Apr 2011 23:26:22 -0000
@@ -284,7 +284,8 @@ swap /tmp mfs rw,nodev,nosuid,-s=153600 
 /dev/sd0h /usr/local ffs rw,nodev 1 2
 /dev/sd0i /home ffs rw,nodev,nosuid 1 2
 /dev/sd0j /usr/src ffs rw,nodev,nosuid,softdep 1 2
-/dev/sd1b none swap sw 0 0
+/dev/sd0b none swap sw
+/dev/sd1b none swap sw
 /dev/cd0a /cdrom cd9660 ro,noauto 0 0
 5b27c2761a9b0b06.i /mnt/key msdos rw,noauto 0 0
 server:/export/ports /usr/ports nfs rw,nodev,nosuid,soft,intr 0 0
Index: sbin/swapctl/swapctl.8
===================================================================
RCS file: /cvs/src/sbin/swapctl/swapctl.8,v
retrieving revision 1.30
diff -u -p -r1.30 swapctl.8
--- sbin/swapctl/swapctl.8      3 Sep 2010 10:08:22 -0000       1.30
+++ sbin/swapctl/swapctl.8      16 Apr 2011 23:26:22 -0000
@@ -74,9 +74,7 @@ it acts as
 .Pp
 .Sy Note :
 The initial swap device (root disk, partition b) is handled automatically
-by the kernel and does
-.Em not
-need to be added to
+by the kernel and does not need to be added to
 .Pa /etc/fstab
 or added via
 .Nm swapctl .
@@ -85,6 +83,9 @@ It will show up as
 in the output displayed with the
 .Fl l
 flag.
+If present in
+.Pa /etc/fstab
+it will be silently ignored.
 .Pp
 The options are as follows:
 .Bl -tag -width Ds
@@ -173,7 +174,7 @@ When parsing the
 file for swap devices, lines such as the following specify additional swap
 devices:
 .Bd -literal -offset indent
-/dev/sd1b none swap sw 0 0
+/dev/sd1b none swap sw
 .Ed
 .Pp
 Additional flags include:

Reply via email to