LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices


Reply
  Search this Thread
Old 10-10-2005, 08:39 PM   #16
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,695

Original Poster
Rep: Reputation: 56

Hi sundialsvcs,

Tks for your advice.

Quote:
(3) init refers to the file /etc/inittab to find out what to do. If you examine this file, you'll see that for runlevel "n" there will be an instruction to execute the stuff in /etc/rc.d/rc.n/. (There's actually a single shell-script, named /etc/rc.d/rc, but you get the idea.)
s# cat /etc/inittab
Code:
# Begin /etc/inittab

id:3:initdefault:

si::sysinit:/etc/rc.d/init.d/rc sysinit

l0:0:wait:/etc/rc.d/init.d/rc 0
l1:S1:wait:/etc/rc.d/init.d/rc 1
l2:2:wait:/etc/rc.d/init.d/rc 2
l3:3:wait:/etc/rc.d/init.d/rc 3
l4:4:wait:/etc/rc.d/init.d/rc 4
l5:5:wait:/etc/rc.d/init.d/rc 5
l6:6:wait:/etc/rc.d/init.d/rc 6

ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now

su:S016:once:/sbin/sulogin

1:2345:respawn:/sbin/agetty -I '\033(K' tty1 9600
2:2345:respawn:/sbin/agetty -I '\033(K' tty2 9600
3:2345:respawn:/sbin/agetty -I '\033(K' tty3 9600
4:2345:respawn:/sbin/agetty -I '\033(K' tty4 9600
5:2345:respawn:/sbin/agetty -I '\033(K' tty5 9600
6:2345:respawn:/sbin/agetty -I '\033(K' tty6 9600

# End /etc/inittab
I could not find
Code:
runlevel "n"
there.

Quote:
(There's actually a single shell-script, named /etc/rc.d/rc,
/etc/rc.d/rc does not exist.

# ls -l /etc/rc.d/ | grep rc
Code:
-rwx------  1 root root 2069 Oct  1 09:11 rc.iptables
drwxr-xr-x  2 root root 4096 Sep 20 07:00 rc0.d
drwxr-xr-x  2 root root 4096 Sep 20 07:00 rc1.d
drwxr-xr-x  2 root root 4096 Sep 10 21:56 rc2.d
drwxr-xr-x  2 root root 4096 Oct  1 15:55 rc3.d
drwxr-xr-x  2 root root 4096 Oct  1 08:41 rc4.d
drwxr-xr-x  2 root root 4096 Oct  1 19:26 rc5.d
drwxr-xr-x  2 root root 4096 Sep 20 07:00 rc6.d
drwxr-xr-x  2 root root 4096 Aug  3 17:46 rcsysinit.d
Quote:
(4) To do that, init (actually rc...) takes an alphabetized listing of all the files in that directory which begin with the letter "S" (for "S"tartup).
Whether you meant
Code:
l1:S1:wait:/etc/rc.d/init.d/rc 1
...
...
su:S016:once:/sbin/sulogin
Quote:
there will be an instruction to execute the stuff in /etc/rc.d/rc.n/. (There's actually a single shell-script, named /etc/rc.d/rc,
Whether you meant
Code:
rwx------  1 root root 2069 Oct  1 09:11 rc.iptables
drwxr-xr-x  2 root root 4096 Sep 20 07:00 rc0.d
drwxr-xr-x  2 root root 4096 Sep 20 07:00 rc1.d
drwxr-xr-x  2 root root 4096 Sep 10 21:56 rc2.d
drwxr-xr-x  2 root root 4096 Oct  1 15:55 rc3.d
drwxr-xr-x  2 root root 4096 Oct  1 08:41 rc4.d
drwxr-xr-x  2 root root 4096 Oct  1 19:26 rc5.d
drwxr-xr-x  2 root root 4096 Sep 20 07:00 rc6.d
drwxr-xr-x  2 root root 4096 Aug  3 17:46 rcsysinit.d
on /etc/rc.d/

[quote][b]And that is why each of the files in the directory begin with "Snn", where nn is a number... to specify the alphabetic-ordering. These commands will be executed in order, given the parameter "start."

Quote:
5) All of these files are usually symbolic links to command-files that will be found in /etc/init.d.
Whether you meant
Code:
# ls -al /etc/rc.d/init.d/
total 204
drwxr-xr-x   2 root root  4096 Oct  1 15:56 .
drwxr-xr-x  11 root root  4096 Oct  1 15:44 ..
-rwxrwxr--   1 root root   676 Sep 20 07:00 alsa
-rwxr-xr--   1 root root  3755 Aug  3 17:46 checkfs
-rwxr-xr--   1 root root  2323 Aug  3 17:46 cleanfs
-rwxr-xr--   1 root root  1107 Aug  3 17:46 console
-rwxr-xr--   1 root root   699 Sep 10 21:56 cups
-rw-r--r--   1 root root 17997 Aug  3 17:46 functions
-rwxr-xr--   1 root root   483 Aug  3 17:46 halt
-rwxr-xr--   1 root root   771 Aug  3 17:46 hotplug
-rwxr-xr--   1 root root  1735 Oct  1 08:41 iptables
-rwxr-xr--   1 root root   978 Aug  3 17:46 localnet
-rwxr-xr--   1 root root  2109 Aug  3 17:46 modules
-rwxr-xr--   1 root root  1245 Aug  3 17:46 mountfs
-rwxr-xr--   1 root root   845 Aug  3 17:46 mountkernfs
-rwxr-xr--   1 root root  1356 Aug  3 17:46 network
-rwxr-xr--   1 root root  2373 Aug  3 17:46 rc
-rwxr-xr--   1 root root   531 Aug  3 17:46 reboot
-rwxr-xr--   1 root root   866 Aug  3 17:46 sendsignals
-rwxr-xr--   1 root root   845 Aug  3 17:46 setclock
-rwxr-xr--   1 root root   825 Aug  3 17:46 swap
-rwxr-xr--   1 root root   767 Aug  3 17:46 sysctl
-rwxr-xr--   1 root root   980 Aug  3 17:46 sysklogd
-rwxr-xr--   1 root root   654 Aug  3 17:46 template
-rwxr-xr--   1 root root  2695 Aug  3 17:46 udev
BR
satimis
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Bash put script jnusa Programming 3 09-07-2004 02:31 AM
Where to put iptables script? tentolga Linux - Networking 9 08-28-2004 07:39 AM
PPPD how do I know what to put in the script? jimdaworm Slackware 4 02-29-2004 12:02 PM
Where to put program/script cmfarley19 Linux - General 5 02-26-2004 01:23 PM
How & where to put script? snakedriver Linux - Newbie 2 01-21-2004 07:11 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

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