LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


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

Rep: Reputation: 30
startup script question


Hi,

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
danboland
Member
 
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: http://www.debian-administration.org/articles/28

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


Reply


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


All times are GMT -5. The time now is 07:15 PM.

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