On Tue, Jun 03, 2008 at 12:12:49PM -0700, Jordan Brown wrote:
> One could imagine having a system call that did the final sync and set 
> the file systems read-only, or something like that, so that we could 
> have additional user-space involvement between the sync and the actual 
> final shutdown, but we don't have that.

Is there no way to do that now?  (sync and remount -o ro, that is)

If there is, then that may be a way to go: svc.startd would stop all
services, killall, sync, remount -o ro, run pre-poweroff hooks, then
uadmin().

> If we don't need to do the final sync before turning off the power, or 
> if we can arrange for userspace involvement after the final sync, then I 
> would hope that we could do all of the sequencing using SMF dependencies 
> rather than by putting additional hooks into svc.startd.

Well, yes; that implies strict shutdown ordering, at least for the last
one or two services.

Jim,

Asking that UPS vendors provide a way to delay poweroff seems
unrealistic (unless they already provide it).  As unrealistic as putting
these hooks in the kernel seems to you.  No, I don't use a UPS at home
(other than my laptop battery :)

Nico
-- 

Reply via email to