Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This 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!


  Search this Thread
Old 05-02-2008, 02:03 PM   #1
Registered: Feb 2007
Posts: 197

Rep: Reputation: 30
startup script question


When we place scripts in /etc/rc2.d, how does it start when we boot up?
How does it start when we put "S" in the front? Don;t we need to give any argument?

Thanks in advance
Old 05-02-2008, 02:26 PM   #2
Registered: Feb 2006
Location: NJ, USA
Distribution: Debian
Posts: 72

Rep: Reputation: 17
This has to do with the way init works.

/etc/rc2.d should contain links to your script in /etc/init.d/

The S in front if it will cause initd to execute the script with the argument 'start'. If there is a k in front of it will will have 'stop' sent to it. The number are the order in which they are called, lowest to highest.

Look at some of the other scripts in /etc/init.d/ for examples of how you should right your own.

you can find some examples on the web about writing these, check out:

Last edited by danboland; 05-02-2008 at 02:35 PM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Newbie Question - Sarge's Startup Script? PaulyWally Debian 13 07-19-2006 10:22 PM
'cannot stat' script in /etc/rc.d/, try to run script at startup quintan Linux - Software 1 11-21-2005 02:53 AM
startup script question flyingcowofdoom Fedora 1 05-14-2005 09:25 AM
Gentoo startup script question SciYro Linux - Distributions 2 08-14-2004 04:36 AM
startup script question estiers Linux - Software 1 12-29-2003 08:55 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:16 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration