LinuxQuestions.org
Help answer threads with 0 replies.
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 08-12-2005, 04:22 PM   #1
kpachopoulos
Member
 
Registered: Feb 2004
Location: Athens, Greece
Distribution: Gentoo,FreeBSD, Debian
Posts: 705

Rep: Reputation: 30
rc[0-6] and inittab


I have come up with the thought that initlevel and rc scripts have something to do with each other, after I had read the chkconfig manual and some other stuff. Is this true, that when i set the inittab runlevel to level X, the respective rc script is executed?
Thanks
 
Old 08-12-2005, 04:27 PM   #2
orgcandman
Member
 
Registered: May 2002
Location: new hampshire
Distribution: Fedora, RHEL
Posts: 600

Rep: Reputation: 110Reputation: 110
Sortof.

Runlevels are used to indicate which mode the system should be run in. The modes defined are:

0 - Halt
1 - Unknown
2 - Single user
3 - Multi user
4 - unknown
5 - Multi user + X
6 - reboot

so if you did something like telinit 6 as root, your system will reboot.

As for running the scripts in rc[0-6] directory, those are run as initialization and de-initialization routines. When you're shutting down, you need to make sure you unmount the filesystems, properly close the logs, etc.. Also, there may be programs you want to run in one mode that you don't want to run in another.

Look at the files labeled S[0-99]somescript and K[0-99]somescript. All the S scripts are invoked with the word 'start' if they're not already running, and all the K scripts are invoked with the word 'stop' if they're already running. The numbers serve to indicate which order things should be started in.

Hope this helps,
Aaron
 
  


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
inittab is missing danielganea Slackware 4 02-13-2005 02:59 PM
edit inittab C_J Linux - Newbie 4 01-24-2005 11:33 AM
inittab mikedeatworld Linux - Software 3 08-13-2004 10:01 AM
Cant get out of inittab InEeDhElPlInUx Linux - Newbie 3 10-09-2003 02:13 PM
/etc/inittab sakeeb Linux - General 9 05-29-2002 09:04 AM

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

All times are GMT -5. The time now is 01:34 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