Solaris / OpenSolarisThis forum is for the discussion of Solaris, OpenSolaris, OpenIndiana, and illumos.
General Sun, SunOS and Sparc related questions also go here. Any Solaris fork or distribution is welcome.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
So far, so good. Now what I'd like to do is include the command as part of the startup process so the sshd daemon starts automatically at bootup. It would be as simple as adding the command to /etc/rc.local under Linux, but there's no such file under Solaris. There are a bunch of /etc/rc* directories where different startup scripts are stored depending upon the runlevel, but I'm not sure I should mess with them manually.
Really ? I always thought that it passed "start" to all the S ones and stop to all the K ones ?
From /etc/init.d/README
"File names in rc?.d directories are of the form [SK]nn<init.d filename>
where 'S' means start this job, 'K' means kill this job, and 'nn' is the
relative sequence number for killing or starting the job. When
executing each script in one of the /etc/rc[S0-6] directories, the
/sbin/rc[S0-6] script passes a single argument. It passes the argument
'stop' for scripts prefixed with 'K' and the argument 'start' for
scripts prefixed with 'S'. There is no harm in applying the same
sequence number to multiple scripts. In this case the order of
execution is deterministic but unspecified. It is recommended that
scripts be hard-linked from the same file stored in /etc/init.d/."
Distribution: Solaris 10, Solaris Express Community Edition
Posts: 547
Rep:
Yes, that's true. But it's also true that one script that receives whichever parameter can just ignore it: one thing is receiving, another thing is using.
Besides, if you respect that structure you can write only one script to start, stop, restart, etc. and using that parameter to switch between behaviours.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.