Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 11 Sep 2004 19:12:02 -0700
From:      George Hartzell <hartzell@kestrel.alerce.com>
To:        Paul Mather <paul@gromit.dlib.vt.edu>
Cc:        freebsd-geom@freebsd.org
Subject:   Re: Mounting root...
Message-ID:  <16707.45170.383349.686634@rosebud.alerce.com>
In-Reply-To: <1094946816.59283.75.camel@zappa.Chelsea-Ct.Org>
References:  <16706.33472.228042.851882@rosebud.alerce.com> <20040911074556.GI30151@darkness.comp.waw.pl> <16707.25008.865268.555842@rosebud.alerce.com> <16707.28763.7201.383177@rosebud.alerce.com> <1094946816.59283.75.camel@zappa.Chelsea-Ct.Org>

next in thread | previous in thread | raw e-mail | index | archive | help
Paul Mather writes:
 > [...]
 > This leaves the start_cmd the same, rather than using the swap1_start
 > function, because swap1_start checks a "no_swap" setting that doesn't
 > seem to be present on FreeBSD but is on NetBSD.  (I don't know if a
 > missing setting defaults to "NO," making this moot.)  Changing stop_cmd
 > to use the swap1_stop function makes turning off swap conditional on the
 > "swapoff" setting, instead of unconditional, in the case of setting
 > "stop_cmd='swapoff -a'".  So, I think the above patch preserves the
 > current behaviour, unless you set 'swapoff="YES"' in /etc/rc.conf, in
 > which case all swap partitions will be unmounted during shutdown.

I'm currently doing a buildworld w/ Pawel's patch, which
unconditionally unmounts swap on shutdown and also adds some
functionality to /etc/rc.d/addswap so that it also unmounts swap on
shutdown.

I am not in the flow of things enough to voice an opinion about
whether it's "better" to preserve the existing behaviour or be
straightforward.  I suppose it might depend on whether this change is
going to try to get into 5.3 or not....

With Paul's patch, you should also add a default value for swapoff in
/etc/defaults/rc.conf, or one of the functions in /etc/rc.subr will
whine about improper usage of the variable for all of the folks that
aren't using it.

g.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?16707.45170.383349.686634>