This procedure shows how to replace a run control script with an SMF service manifest so that the run control service can be managed by SMF. To convert a run control script, use the rc-script name with the -s option of the svcbundle command. See the svcbundle (1M) man page for more information or enter svcbundle help rc-script.
By default, svcbundle creates a transient service. Determine whether this run control script starts any long running daemon and is a contract service. See Service Models and the svc.startd (1M) man page for information about service models.
In this example, the service name is ex_con and is a contract service that runs at level 2.
$ svcbundle -o /tmp/ex_con.xml -s service-name=ex_con -s rc-script=/etc/init.d/ex_con:2 -s model=contract
Verify that the content of the /tmp/ex_con.xml manifest is what you need. Add comments as needed.
$ cp /tmp/ex_con.xml /lib/svc/manifest/site/ex_con.xml
$ /etc/init.d/ex_con stop
Remove any links to the run control script from the appropriate rcn.d directories.
$ svcadm restart manifest-import
Verify that the new service exists and is in the expected state.
$ svcs ex-con