Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 20 Sep 2015 20:04:45 +1000 (EST)
From:      Ian Smith <smithi@nimnet.asn.au>
To:        Colin Percival <cperciva@freebsd.org>
Cc:        Anthony Jenkins <Scoobi_doo@yahoo.com>, Jung-uk Kim <jkim@freebsd.org>, "freebsd-acpi@freebsd.org" <freebsd-acpi@freebsd.org>
Subject:   Re: disabling sleep when shutting down
Message-ID:  <20150920194946.U29510@sola.nimnet.asn.au>
In-Reply-To: <55FE5D54.1030806@freebsd.org>
References:  <55FA3848.7090802@freebsd.org> <55FB233D.2080000@FreeBSD.org> <55FB48E3.20401@freebsd.org> <55FC4F13.3090603@FreeBSD.org> <55FC57F9.3050702@yahoo.com> <55FE5D54.1030806@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 20 Sep 2015 00:16:36 -0700, Colin Percival wrote:
 > On 09/18/15 11:29, Anthony Jenkins wrote:
 > > Is it possible for /etc/rc.shutdown to complete, but shutdown not
 > > occur?  If so, there should be a mechanism to restore the ability to
 > > suspend.  Other than that, I like it.
 > 
 > Hmm... well, rc.shutdown runs before the system drops into single-user
 > mode.  Which makes me think that maybe we should be making the kernel
 > call from inside init instead of from rc.shutdown.

I still think disabling suspend from shutdown.c, at the same time as 
creating /var/run/nologin might be the best way to go, to avoid any 
possibility of untimely suspending once committed to shutting down.

For one thing, shutdown's -o flag bypasses using init and calls halt or 
reboot directly, though I don't know if anyone uses that.  For another, 
if shutdown fails for any reason, or is cancelled by signal by the user 
.. or in any case, I gather .. finish() removes /var/run/nologin, and 
could also there reenable suspend, covering Anthony's point.

cheers, Ian



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