0

How can i run a script on Serverboot in SmartOS? I don't find any Information about it in the wiki.

Since /etc, /usr and /root gets reset on each start, i cant use the common ways like /etc/init.d. Even the Solaris-Guides i found on the web do not work.

I also tried @reboot on crontab, but i found out, that this also is not supported.

For now, i always have to manually execute the script to add 2 etherstubs. How can i automate it?

1 Answers1

0

SmartOS uses SMF (service management facility). On boot, SMF will look for and load any SMF manifests found in /opt/custom/smf. This is the primary way by which you can introduce persistent customization to SmartOS.

https://wiki.smartos.org/administering-the-global-zone/ has some details regarding this.

Another source for post boot customization: https://www.cyber-tec.org/2013/12/27/smartos-global-zone-customization/