Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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.
Start-up scripts. S tells the system to start the application in question at boot time, K (=kill) tells it to leave it alone. The numbers indicate the order in which applications are started at boot time.
Under standard unix the script is placed in the directory /etc/init,d. There is no S or K in front. The second number behind S or K means only that the timeming gets OK. For example: you cannot stop tcp before nfs. Or the opposite by starting. All the thing works by ls in shellscript. That means list sequetial
If i want to add a script in the init.d and create links in the run levels is there a way of correctly doing it so that it will act normally and the script will load properly upon boot.
Most of those scipts are in shell, so have a look at a few and pick one that's close to what you want, then make your own copy.
It's usually advised that you put your stuff in
/etc/rc.local
file, or the equiv for your distro. Should be that for Centos, not sure about Ubuntu.
Distribution: Ubuntu, Debian, Various using VMWare
Posts: 2,088
Rep:
A tip: If you want to stop a service from starting when you enter a particular run level, change the capital S to lower case S in the relevant directory.
For example, if you don't want sendmail to start when you enter run level 2:
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.