Nicolas Williams writes:
> On Mon, Jun 02, 2008 at 04:20:28PM +0100, Sean Sprague wrote:
> > James/Brian,
> > > Brian Utterback writes:
> > >>> /etc/rc0.d/K99ups, maybe?
> > >
> > > I think it'd probably take a new SMF service option to do this.
> > 
> > It wouldn't be the first time that /sbin/uadmin magically became a shell 
> > script...
> 
> It does sound like this should be a hook in /sbin/uadmin or in the
> kernel...

I disagree on the /sbin/uadmin part.  The key architectural feature of
the uadmin(2) system call (and the related /sbin/uadmin utility) is
that it interacts with the kernel directly: you tell it to reboot, and
it surely does that.  It doesn't fuss with anything else.  If you
didn't want that behavior, then you should use the more clearly
documented halt(1M) and related administrative interfaces.

That's why uadmin quite intentionally does not run bootadm to update
the system archives.  If you're messing with uadmin, the presumption
is that you must know what you're doing.

What we're talking about here is something that appears to me to be
different.  We want to have some transient service guaranteed to run
*last* before anything else, so it can tell the UPS to shut down the
output.

The important issue is exactly when this can go.  If it can somehow
safely be invoked by startd itself (without causing trouble for the
root file system), then that'd be good, because it'd be simple.  If it
has to go after the root itself is sync'd and stable, and thus right
before the kernel halts, then it's going to need to be a kernel
module of some sort.

-- 
James Carlson, Solaris Networking              <james.d.carlson at sun.com>
Sun Microsystems / 35 Network Drive        71.232W   Vox +1 781 442 2084
MS UBUR02-212 / Burlington MA 01803-2757   42.496N   Fax +1 781 442 1677

Reply via email to