LinuxQuestions.org
Review your favorite Linux distribution.
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 11-26-2006, 03:53 PM   #1
skylimit
Member
 
Registered: Nov 2006
Location: England
Distribution: Slackware, Ubuntu feisty
Posts: 41

Rep: Reputation: 15
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
 
Old 11-26-2006, 04:02 PM   #2
Zmyrgel
Senior Member
 
Registered: Dec 2005
Location: Finland
Distribution: Slackware, CentOS, RHEL, OpenBSD
Posts: 1,006

Rep: Reputation: 37
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.
 
Old 11-26-2006, 04:02 PM   #3
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 65
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
 
Old 11-26-2006, 06:32 PM   #4
skylimit
Member
 
Registered: Nov 2006
Location: England
Distribution: Slackware, Ubuntu feisty
Posts: 41

Original Poster
Rep: Reputation: 15
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.

Last edited by skylimit; 11-26-2006 at 06:34 PM.
 
Old 11-26-2006, 07:02 PM   #5
speck
Member
 
Registered: Nov 2001
Location: US
Distribution: Slackware 14.2
Posts: 375

Rep: Reputation: 115Reputation: 115
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".
 
  


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
Running a script as su automatically TongueTied Linux - Security 1 05-01-2006 09:06 AM
Automatically running script at shutdown samac Slackware 2 05-14-2005 10:10 AM
writing a script running firestarter automatically with kppp without root priviliges melquiades Linux - Newbie 3 08-11-2003 06:50 AM
running a script automatically when Logging out? hamster Linux - General 2 06-03-2003 08:49 PM
automatically running commands... lhoff Linux - General 9 02-21-2002 02:34 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:18 AM.

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
Open Source Consulting | Domain Registration