disabling sleep when shutting down
Ian Smith
smithi at nimnet.asn.au
Sun Sep 20 10:04:54 UTC 2015
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
More information about the freebsd-acpi
mailing list