On Thu, Sep 8, 2011 at 3:25 PM, Jordan Brown <[email protected]> wrote:
> On 09/08/11 12:32, Dave Miner wrote:
>>
>> I don't recall that startd actually differentiates between start and
>> refresh methods here; I'd expect you can just exit SMF_ERR_EXIT_CONFIG and
>> let things happen.
>
> I thought about that, and it's a plausible answer, but it's a moderately
> complex one because it means that the refresh method needs two-way
> communications with the service instead of the usual one-way signal.
>
> I can conveniently have two-way communication between the refresh method and
> the service, so I'll try that.

IIRC there's an SCF API that you can use to put a service into
maintenance; don't recall if it's the one you mentioned earlier.  If
that doesn't work then you could have the service posix_spawn() or
outright exec() "svcadm mark maintenance <fmri>".  You could also
abort() (e.g., if the service lacks the priv to fork or the
authorization to place the service itself into maintenance via
svcadm).  You could also just exit the services' processes and on
subsequent restart exit with SMF_ERR_EXIT_CONFIG.

There's lots of options.  Try them from simplest to ugliest and pick
the simplest one that works :)

Nico
--
_______________________________________________
smf-discuss mailing list
[email protected]

Reply via email to