LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   startup script (https://www.linuxquestions.org/questions/linux-newbie-8/startup-script-52396/)

c0c0deuz 03-29-2003 02:52 PM

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?

fsbooks 03-29-2003 02:57 PM

Assuming you mean /etc/rc.d/rc.local, that would be correct.

c0c0deuz 03-29-2003 03:05 PM

Yes.
Thank You

cijunet 03-29-2003 03:26 PM

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.


All times are GMT -5. The time now is 12:01 AM.