OK, here is what I ended up doing. But it feels a little hacky...

My package postinstall script that:

1. touches a specifically named file in /tmp
2. svccfg imports the XML for my service. (The service is enabled by default).

My service's exec method is a script that:

1. Checks for the existence of the specifically named file above.
   a. If it exists the service is temporarily disabled (svcadm disable -t) and 
exists with OK.
   b. If the file does not exist it is assumed we are on next boot and we do 
the work the service is meant to do.
2. Once the service has finished it removes itself. (svccfg delete -f )

This method, of course relies on /tmp being /tmpfs and emptied on reboot.
 
 
This message posted from opensolaris.org

Reply via email to