[OpenIndiana-discuss] Customized startup commands?

Peter Tribble peter.tribble at gmail.com
Sun Oct 9 12:33:02 UTC 2011

On Sun, Oct 9, 2011 at 4:38 AM, Dan Swartzendruber <dswartz at druber.com> wrote:
> Okay, I've got to be missing something here.  I'm used to the linux/bsd deal
> where you put per-server commands in /etc/rc.local, executed after all else.
> There seems to be no equivalent in opensolaris, and google has NOT been my
> friend here :(  What am I missing?

So, you can put startup scripts in /etc/rc3.d, and as long as they're executable
and start with S, you're done. This is pretty similar to linux. The monolithic
rc.local doesn't exist.

The official way is to write an SMF manifest and import it. This actually isn't
that hard, if you just take an existing manifest (look under /var/svc/manifest)
that is close to what you want to do. Often you end up with a manifest that
simply calls your old rc script (conventionally placed into /lib/svc/method).

Now, the SMF way actually has a lot more power than merely starting things
up at boot, and it's how the normal system services are managed, so it's
worth learning (look at the svcs, svcadm, and svccfg commands).

-Peter Tribble
http://www.petertribble.co.uk/ - http://ptribble.blogspot.com/

More information about the OpenIndiana-discuss mailing list