LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
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, 05:22 PM   #1
kpachopoulos
Member
 
Registered: Feb 2004
Location: Athens, Greece
Distribution: Gentoo,FreeBSD, Debian
Posts: 704

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, 05:27 PM   #2
orgcandman
Member
 
Registered: May 2002
Location: dracut MA
Distribution: Ubuntu; PNE-LE; LFS (no book)
Posts: 594

Rep: Reputation: 102Reputation: 102
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


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
inittab is missing danielganea Slackware 4 02-13-2005 03:59 PM
edit inittab C_J Linux - Newbie 4 01-24-2005 12:33 PM
inittab mikedeatworld Linux - Software 3 08-13-2004 11:01 AM
Cant get out of inittab InEeDhElPlInUx Linux - Newbie 3 10-09-2003 03:13 PM
/etc/inittab sakeeb Linux - General 9 05-29-2002 10:04 AM


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