Brian Gupta writes:
> Are you trying to register a new service? If so, my understanding is
> that svd.configd needs to have been launched at system startup.
> 
> So, while checking for svcadm will tell you if the system was built
> with sfw, it will not let you know if you can register a new service.
> (Feel free to correct my understanding, as I am still absorbing all
> the changes in S10+).
> 
> psck=svc.configd;echo -e "$psck is \c";pgrep $psck >/dev/null 2>&1; if
> [ $? -eq 0 ]; then echo running; else echo not running 1; fi
> 
> If you need to actually start or stop the svc you need to replace also
> check for svc.startd

This is way more than we do within most services. :)  If you just need
to check whether SMF is currently available on your system from a
shell script, we've provided smf_present() in the
/lib/svc/share/smf_include.sh file.  It looks for configd's door, which
is a good check to see if the system has been booted a userland that
supports SMF.

I haven't piped up with this before because it's less suitable from
within Java.

liane

Reply via email to