Brian Gupta wrote:
> 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

The correct way to check if SMF is running from the shell is this:

. /lib/svc/share/smf_include.sh

and use smf_present function.

This is documented in smf_method(5).


-- 
Darren J Moffat

Reply via email to