Subject: Re: port-i386/37009: unable to use swap partition found on USB drive
To: None <gnats-bugs@netbsd.org>
From: James Hartley <jjhartley@gmail.com>
List: netbsd-bugs
Date: 09/20/2007 14:08:08
On 9/20/07, John Nemeth <jnemeth@victoria.tc.ca> wrote:
> The following reply was made to PR port-i386/37009; it has been noted by GNATS.
> ...
>       Try putting the above lines into /etc/rc.conf.d/swap1.

$ cd /etc/rc.conf.d
$ ls -l
total 4
-rw-r--r--  1 root  wheel  120 Sep 13 14:57 fsck
-rw-r--r--  1 root  wheel  117 Sep 20 13:57 swap1
$ cat swap1
start_precmd=swapctl_precmd
swapctl_precmd() {
    n=60
    echo "delaying swapctl for $n seconds..."
    sleep $n
}
$

After creating the above file & rebooting, I see the same errant
behavior.  During initialization, the following messages scroll by
before fsck checks all partitions defined in /etc/fstab.

swapctl: adding /dev/sd0b as swap device at priority 0
swapctl: /dev/sd1b: Device not configured

Yes, I can manually add the swap partition later through swapctl -a,
but the fundamental question still remains as to how to delay swapctl
initially as I can with fsck.

Jim