"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.

As I said:
> > Currently, an interface which is synchronous to online/disabled is only
> > formally available through svcadm [en|dis]able -s.  I believe there's an
> > RFE to make the synchronous semantics through libscf, but don't have the
> > bugid to hand.  It'd make a great OpenSolaris RFE, though. :)

In the meantime, you could wait a little bit to see if smf_get_state()
returns SCF_STATE_STRING_ONLINE before continuing. 

liane
-- 
Liane Praza, Solaris Kernel Development
liane.praza at sun.com - http://blogs.sun.com/lianep

Reply via email to