LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   running a script automatically (https://www.linuxquestions.org/questions/linux-newbie-8/running-a-script-automatically-505058/)

skylimit 11-26-2006 03:53 PM

running a script automatically
 
Hi all, Im creating a virtual network of virtual machines on a CentOS
host and Im having problems trying to run scripts automatically during boot time. Is anyone able to help me out please? many thanks

Zmyrgel 11-26-2006 04:02 PM

Just check from which file is used to launch boot time scripts. In slackware it's /etc/rc.d/rc.local

Just put full path to that file and it should work. CentOS probably uses some other file but thats how it should work.

Brian1 11-26-2006 04:02 PM

With little info on exactly what you are using and what you are doing here is a thought. If using command line to start all the place the commands in /etc/rc.local. Note make sure you use full path to all commands.

Brian

skylimit 11-26-2006 06:32 PM

Quote:

Originally Posted by Zmyrgel
Just check from which file is used to launch boot time scripts. In slackware it's /etc/rc.d/rc.local

Just put full path to that file and it should work. CentOS probably uses some other file but thats how it should work.

hi, thanks for your reply but i dont quite get how to put the file path e.g. i have the scripts in /vmware/scripts. how do i put this path to the file? many thanks in advance.

speck 11-26-2006 07:02 PM

Using a text editor (vi, emacs, gedit, etc.), add a line like the following to the bottom of your /etc/rc.d/rc.local file:

Code:

/vmware/scripts/name_of_your_script.sh
Your rc.local file may not be in /etc/rc.d/, but you can search for it "locate rc.local".


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