-------- Original Message  --------
Subject: Re:[smf-discuss] How to make a service go into maintenance.
From: Brian Utterback <brian.utterb...@sun.com>
To: Renaud.Manus at Sun.COM
Cc: smf-discuss at opensolaris.org
Date: Wed Apr 04 2007 15:14:55 GMT+0200 (CEST)

> Okay, at least it is doable. Now, can it be done programatically
> from within the daemon?

Yes, by using the libscf API and smf_maintain_instance() / 
smf_disable_instance()

-- Renaud

> 
> Renaud Manus wrote:
>> -------- Original Message  --------
>> Subject: [smf-discuss] How to make a service go into maintenance.
>> From: Brian Utterback <Brian.Utterback at Sun.COM>
>> To: smf-discuss at opensolaris.org
>> Date: Wed Apr 04 2007 14:57:16 GMT+0200 (CEST)
>>
>>> I have two related questions. The first is how can a daemon supplying
>>> a service indicate that there is a problem and that the service should
>>> go into maintenance rather than having the restarter restart it?
>>
>>     svcadm mark maintenance FMRI
>>
>>>
>>> Secondly, on a related note, is there anyway to mark a service as
>>> "not applicable"? If, for instance a service that was designed
>>> specifically for a particular configuration found itself started
>>> on a system without that configuration, is there a way for the
>>> daemon to exit and not get restarted and not appear in maintenance
>>> but still get started on the next reboot?
>>
>> Your daemon could just disable it until the next reboot:
>>
>>     svcadm disable -t FMRI
>>
>> Does that help?
>>
>> -- Renaud
>>
> 


Reply via email to