LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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 01-17-2012, 02:55 PM   #1
mccartjd
Member
 
Registered: Apr 2008
Posts: 108

Rep: Reputation: 15
Smile Easy question. Where do I place a script I want to start when RHEL boots?


I have a script located in my /scripts directory (/scripts/startup) and wondered if I entered this path someplace on my RHEL 5 system so when the system is rebooted or turned on that it will read and execute this script as it boots? Is there a specific location within the file or can I just enter the path anywhere in the file? As insert the script path I wish to run to I just type the path, and that's it? Is the location somthing like /etc/rc?

A million thanks
Johnny Macm
 
Old 01-17-2012, 03:00 PM   #2
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,527

Rep: Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898
You can put it in
Code:
/etc/rc.d/rc.local
or
Code:
/etc/rc.local
depending of the distro.

Kind regards
 
Old 01-17-2012, 03:03 PM   #3
sycamorex
LQ Veteran
 
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,819
Blog Entries: 1

Rep: Reputation: 1200Reputation: 1200Reputation: 1200Reputation: 1200Reputation: 1200Reputation: 1200Reputation: 1200Reputation: 1200Reputation: 1200
I think /etc/rc.d/rc.local is what you're looking for.
 
Old 01-18-2012, 12:29 AM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,260

Rep: Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328
In RHEL5, actual file is /etc/rc.d/rc.local and there is a symlink from /etc/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
How to make my PERL script start automatically when my HP-UX and IBM-AIX box boots up Nings Programming 1 11-26-2008 04:43 AM
How can I make my perl script start when system boots up in HP-UX and in IBM-AIX mach Nings Programming 1 11-26-2008 03:03 AM
easy script question citrus Linux - Newbie 7 03-23-2005 04:58 PM
Easy Question, can I place any directory onto another server? lexington Linux - Newbie 4 05-26-2004 02:38 PM


All times are GMT -5. The time now is 05:16 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration