LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How do I make a script run at boot? (https://www.linuxquestions.org/questions/linux-newbie-8/how-do-i-make-a-script-run-at-boot-307230/)

ToothlessRebel 03-28-2005 10:03 PM

How do I make a script run at boot?
 
How would I make a script on the machine run at boot?

/bin/bash 03-28-2005 10:07 PM

With slack you just put the script in /etc/rc.d directory and make it executable.

Joey.Dale 03-28-2005 10:51 PM

Also you could call it from rc.local:

Code:

echo "/path/to/foo.sh >> /etc/rc.d/rc.local
-Joey

vimal 03-29-2005 02:26 AM

you just write the script and place it in /etc/rc.d/rcX.d.
the X denotes the runlevel . also give it exec: permission for root. thats all

Joey.Dale 03-29-2005 07:23 AM

Quote:

you just write the script and place it in /etc/rc.d/rcX.d.
the X denotes the runlevel . also give it exec: permission for root. thats all
Slackware uses BSD style init scripts, Redhat uses SystemV style scripts. So in slackware, the two answers before youur are correct.

-Joey

ToothlessRebel 03-29-2005 08:44 PM

Thanks
 
Just a thank you.

/bin/bash 04-01-2005 06:05 AM

Here is a good explanation of the boot process for Slackware.
Slackware Linux 101

gfreire 04-15-2005 02:26 PM

how about in Suse 9.2 i need to create a simple script that runs at boot so it can configure my wireless.

ToothlessRebel 04-27-2005 12:30 AM

Umm, I wrote a script and placed it in /bin so that I may type "start-teamspeak" and it run the script to start a teamspeak server. However, if I add the line "start-teamspeak" to the file rc.local, it doesn't start the process at boot. What could I be doing wrong? Yes, the command works when not called by rc.local.

bdox 04-27-2005 01:46 AM

try
/bin/start-teamspeak
in rc.local


All times are GMT -5. The time now is 04:12 PM.