LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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 03-29-2003, 03:52 PM   #1
c0c0deuz
Member
 
Registered: Aug 2001
Location: Qc, Canada
Distribution: RedHat, Mandrake, FreeEOS
Posts: 336

Rep: Reputation: 30
startup script


i want to add line to startup script... (well that's what it's asking me in a Howto...)
Where is it ?
Is it rc.d/rc.local?
 
Old 03-29-2003, 03:57 PM   #2
fsbooks
Member
 
Registered: Jan 2002
Location: Missoula. Montana, USA
Distribution: Slackware (various)
Posts: 457

Rep: Reputation: 41
Assuming you mean /etc/rc.d/rc.local, that would be correct.
 
Old 03-29-2003, 04:05 PM   #3
c0c0deuz
Member
 
Registered: Aug 2001
Location: Qc, Canada
Distribution: RedHat, Mandrake, FreeEOS
Posts: 336

Original Poster
Rep: Reputation: 30
Yes.
Thank You
 
Old 03-29-2003, 04:26 PM   #4
cijunet
Member
 
Registered: Nov 2002
Location: Vancouver
Distribution: Slackware 9.0
Posts: 43

Rep: Reputation: 15
Indeed, you can add a script at the end of /et/rc.d/rc.local (or even a command) and it will be run when the system will start up. Also there is another option, used specially when you want to control when the script should be executted.. (i.e. firewall scripts). In that case, you can put the script in /etc/rc.d/init.d and create a symbolic link to a specific runlevel directory.
ln -s /etc/rc.d/init.d/scriptname /etc/rc.d/rc3.d/S03scriptname.
What that means? Means that your script will be start before others services (03 represents priority and S means Start).
Similar should be done for rc6.d and rc0.d . First is for reboot second for shutdown.
ln -s /etc/rc.d/init.d/scriptname /etc/rc.d/rc0.d/K90scriptname
K stands for kill.
That's it!!
Forgot to tell you something... I'm a newbie like you and maybe I made some mistakes.
 
  


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
'cannot stat' script in /etc/rc.d/, try to run script at startup quintan Linux - Software 1 11-21-2005 03:53 AM
How to call a script from a system startup script? jonatito Linux - Newbie 7 11-11-2005 10:40 PM
startup script rockwell_001 Linux - General 4 04-21-2005 05:22 PM
startup script ... again. Vindane Linux - Wireless Networking 2 03-04-2005 03:57 AM
Script at startup rohde Linux - Newbie 2 09-12-2004 10:32 AM


All times are GMT -5. The time now is 02:58 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