But, with the bit of code that I am working with, this is not possible.
I can put a sleep() or a loop few times to see if the service is enabled and
then continue with the rest of the code.

-Narendra


On 7/27/07, David Bustos <David.Bustos at sun.com> wrote:
>
> Quoth Liane Praza on Wed, Jul 25, 2007 at 10:23:35PM -0700:
> > "Narendra Kumar S.S" writes:
> > > Now, I have written a code, which calls smf_enable_instance to enable
> > > filesystem/local service.
> > > Immediately after returning from this call, the next instruction,
> tries to
> > > access a file on one of the local filesystems.
> > > So, are there chances that, the filesystem/local is not yet completely
> > > enabled and because of that, the local filesystem is not yet mounted
> and
> > > hence this instruction might fail!?
> >
> > It is completely enabled.  However, enabled doesn't mean the service
> > is online.  It means that we're trying to make it be online, but its
> > dependencies may not be satisfied, it may have failed, or it may just
> > not be online yet.
>
> Another way to do this would be to split the filesystem-accessing code
> into a service which depends on filesystem/local.  Then we won't execute
> it until filesystem/local is online.  This might be a lot of extra work,
> though.
>
>
> David
>



-- 
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/20070727/19d67c53/attachment.html>

Reply via email to