Ceri Davies wrote:
> I'm completely with you.  I'm suggesting that svc.startd is the best place
> to put the hook rather than the kernel.

The problem is that one of the very last things that is done before the 
system shuts down completely is that the file systems are fully sync'ed 
out and unmounted.  For UFS at least, that has to happen before the 
power is removed.  That final sync happens inside uadmin(2), inside the 
kernel.

(I believe ZFS is more robust.  Perhaps for Nevada/OpenSolaris we can 
require a ZFS root and unmount all UFS file systems before the final 
uadmin(2).)

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.

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.

Reply via email to