On 9/17/07, Tomas Heran <Tomas.Heran at sun.com> wrote:
>
>
>
> Narendra Kumar S.S wrote:
> > Hi,
> >
> >      In my code I am calling smf_enable_instance() to enable and
> > smf_disable_instance() to disable the filesystem/local service.
> >
> >      Now, if the previous state is either "Uninitialized" or
> > "Maintenance" or "Degraded", will the above calls to get the service
> > enabled/disabled will have any effect?
> >
>       The  smf_restore_instance() function brings an instance cur-
>       rently in the maintenance to  the  uninitialized  state,  so
>       that  it  can  be  brought back online. For a service in the
>       degraded state, smf_restore_instance() brings the  specified
>       instance back to the online state.


That means, if the state is "Maintenance", then we must call
smf_restore_instance() followed by smf_enable_instance().
And if the state is "Degraded", then if we call smf_restore_instance(), that
itself will bring the service to "Enabled".
Is my understanding correct?

Thanks,
Narendra

smf_disable_instance() will IMO have the expected effect (i.e. bringing
> the instance to disabled state) regardless of the previous state.
>
> Tomas
>



-- 
Warm Regards,
Narendra

Visit my blogs at:
http://ssnarendrakumar.blogspot.com/
   ___    ___    __    _
  /  __/  /  __/  /     | / /
_\   \   _ \   \   /   /| |/ /
\___/ \___/   /_/ |__/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://mail.opensolaris.org/pipermail/smf-discuss/attachments/20070917/501ab845/attachment.html>

Reply via email to