Troubleshooting SMF Scripts for automatic startup

March 26, 2018 at 09:37:56
Specs: Sun 5.11
I'm more familiar with starting up processes after a reboot with the entries in /rc3.d however I'm being pushed to use SMF scripts. I've been given commands, but I don't necessarily understand what I'm doing and so it's hard to troubleshoot. Here are my steps. I'm not getting any errors, but it's not creating the service either. What am I doing wrong?

1 - Copy script to /lib/svc/method
2 - Issue command to create an XML file and create the service (I think)

svcbundle -o /lib/svc/manifest/site/scriptname.xml -s service-name=site/scriptname -s start-method="/lib/svc/method/scriptname start component1" -s stop-method="/lib/svc/method/scriptname stop component1"

3 - Edit generated scriptname.xml file to add an XML tag and identify the user the script should run as.

4 - Reload the script since I modified the original XML file?

svcadm restart manifest-import

5 - Enable the service

svcadm enable site/scriptname


If anyone has any insight / suggestions I'd love to hear them. Thanks.


See More: Troubleshooting SMF Scripts for automatic startup

Reply ↓  Report •

#1
April 8, 2018 at 00:02:27
Must be something wrong in your methodology.

Reply ↓  Report •
Related Solutions


Ask Question