LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 12-18-2001, 04:27 AM   #1
damion
LQ Newbie
 
Registered: Oct 2001
Location: Devon, UK
Distribution: Fedora Core 2
Posts: 6

Rep: Reputation: 0
Question Starting programs at boot (RedHat specific?)


Can anyone give me some advice on starting programs at boot (RedHat 7.2)?

I've worked out the following...
- At boot /etc/inittab is exec'd
- /etc/inittab calls /etc/rc with the runlevel as its argument
- /etc/rc executes all the files in /etc/rc.d/rc<runlevel>.d
- The files in /etc/rc.d/rc<runlevel>.d are all symlinks to the startup scripts for the various services with filenames in the format K|S<number><scriptname>
- If the symlink begins with a 'K' then the script is run with the argument 'stop', if the symlink begins with an 'S', the script is run with the argument 'start'.
- The scripts are run in numerical order of the number component of their symlink name

OK, now the question...

How do you decide what number to give a new symlink when adding a program to the startup sequence? The number for the existing 'stop' links don't relate to those for 'start' links (e.g K10xfs and S90xfs)

Previously I've done this sort of thing with linuxconf, but I thought I ought to be able to do it for myself...
 
Old 12-18-2001, 06:33 AM   #2
Mik
Senior Member
 
Registered: Dec 2001
Location: The Netherlands
Distribution: Ubuntu
Posts: 1,316

Rep: Reputation: 47
The number just decides which one gets started first. The lower the number the earlier it gets executed. It's up to you which number you give each link.

Try reading the book at http://linuxfromscratch.org it explains all about the init scripts.
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Automatic log in and starting programs at boot Spy47 Linux - Newbie 3 11-18-2004 05:17 PM
Automatically starting programs for individual users at boot johnleemk Linux - General 1 09-13-2004 05:24 AM
Only starting command in a specific time period jeroenvrp Linux - Software 3 07-20-2004 11:18 PM
redhat 9.0 gnome--starting programs automatically dave37 Linux - Newbie 6 10-01-2003 04:49 AM
starting X from the command line in a specific resolution jdaniel Linux - General 5 09-10-2003 09:25 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 11:09 PM.

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