David Bustos wrote:
> Quoth Renaud Manus on Fri, Apr 27, 2007 at 06:19:46PM +0200:
>> -------- Original Message  --------
>> Subject: Re:[smf-discuss] How to make a service go into maintenance.
>> From: Brian Utterback <Brian.Utterback at Sun.COM>
>> To: Renaud.Manus at Sun.COM
>> Cc: smf-discuss at opensolaris.org
>> Date: Fri Apr 27 2007 17:57:37 GMT+0200 (CEST)
>>
>>> I have a question. In the man page for smf_maintain_instance, it says
>>> that it can take two flags, SMF_TEMPORARY and SMF_IMMEDIATE. It says
>>> that SMF_TEMPORARY means that the state lasts only for the lifetime
>>> of the current system instance (SMF-speak for until reboot?) and
>> yes
> 
> Yes, though note that we don't have persistent maintenance (yet), so
> leaving the flag off will still act temporarily.
> 
>>> that SMF_IMMEDIATE takes place immediately killing any running methods.
>>> By "running method", does that include the actual daemon process?
>> yes
> 
> Yes, though immediate is intended to mean that SMF will put the service
> into maintenance without trying to stop the service if it's running.
> Ordinarily we try to stop the service.
> 
> 
> David

Okay, now I am a bit confused. What I want is for my daemon to exit,
marking the service as in maintenance mode and for the daemon to not
be restarted. Rebooting should but everything back to normal.  So,
do I use smf_maintain_instance or smf_disable_instance or both, with
SMF_IMMEDIATE or SMF_TEMPORARY or both flags. And should I exit, or
wait for SMF to kill the daemon. Or should I use smf_get_state to
test the stae before exiting on my own?


-- 
blu

"When Congress started Daylight Savings Time earlier, did
they even consider what affect an extra hour of daylight
would have on global warming? Well, did they?"
----------------------------------------------------------------------
Brian Utterback - Solaris RPE, Sun Microsystems, Inc.
Ph:877-259-7345, Em:brian.utterback-at-ess-you-enn-dot-kom

Reply via email to