Mike Gerdts wrote: > Perhaps a special exit code for "reboot required" would cause run-once > to trigger a dependent service to initiate a reboot after all the > run-once services had completed.
My initial thought would be to do it as a property or environment variable on the service, so that there's no requirement that the target command use or not-use any particular exit code. However: - My application doesn't need a reboot, so my only incentive to design a mechanism is my own OCD. - I would still be concerned about rebooting while *other* services are running. - A property mechanism wouldn't allow for the run-once to dynamically decide whether a reboot is needed. Perhaps a property or environment variable could enable responding to a special exit code. > If the run-once service leaves > something running in the background That would be rude. Don't do that. Things to be left running in the background should be in their own SMF service. (And, in fact, my run-once does have several.) > the "svcadm disable" may kill off > that thing. I don't think so. Note that the stop method is :true and has a timeout of 0... I think it'll wait forever for everything in the contract to exit. > Is ctrun needed in the mix? Shrug.