So, to get something like
/etc/rc.local you can use the custom SMF import facility. (See the source
for more information about how this actually works.)
/opt is mounted out of
zones/opt by default. You can create a directory
/opt/custom/smf and populate it with SMF manifests. Any manifests you put in there will be imported by SmartOS when it boots. Below is an example SMF manifest that simply starts
/opt/custom/bin/postboot, a self-explanatory shell script that you can use like
Note that it would likely be better to customise and respin your own images, as putting a bunch of platform state in the zones pool undoes some of the benefits of the ramdisk platform architecture that SmartOS has.