Edgar Merino wrote:
> Hello,
> 
>     I would like to execute a set of commands when solaris boots up 
> (right after all the system processes have started), I haven't found a 
> way to do this in opensolaris (b109), I would like a similar 
> functionality like rc.local found in some *nixes. I've tried to 
> accomplish this by creating a manifest for this purpose but smf will 
> stop the service when the script containing the set of commands ends, 
> will this disable the service on next bootup?
> 
>     Also, the above solution is only a hack, since the functionality I 
> need is not actually provided by a service. What would you suggest?
> 

Packaging your commands as an SMF service is the recommended solution. 
Typically, you'd define this as a transient service, which executes the 
scripted commands you supply and then exits.  Many of the services you 
see defined in OpenSolaris are defined exactly this way.

Oh, and yes, the service will remain enabled for the next system restart 
unless you specifically disable it, either manually or as part of the 
script.

Dave

Reply via email to