Which two statements are true concerning the files contained in the run level-specific directories rc0.d through rc6.d?

Examine the contents of /etc/rc.d

Which two statements are true concerning the files contained in the run level-specific directories
rc0.d through rc6.d?

Examine the contents of /etc/rc.d

Which two statements are true concerning the files contained in the run level-specific directories
rc0.d through rc6.d?

A.
The files starting with S or K are links to scripts in the /ete/init.d directory.

B.
The files starting with S are always invoked by the /etc/rc.d/rc script even if the service
managed by that script is already down.

C.
The files starting with S or K are added by using the chkcor.fig command.

D.
The files starting with K are always invoked by the /rc/rc,d/re script even if the service managed
by that script is already up.

E.
The files starting with S are invoked before those starting with K.

Explanation:



Leave a Reply 4

Your email address will not be published. Required fields are marked *


*****

*****

Answer : A and C

For each run level N, there is an /etc/rcN.d directory that contains the scripts that init uses to start
and stop services. For example, /etc/rc3.d is the directory for run level 3. Each script in an /etc/
rcN.d directory is actually a symbolic link to a script in /etc/init.d. Using symbolic links allows you to
reconfigure run levels (<– chkconfig) without affecting the scripts that the symbolic links reference.
The name of each symbolic link begins with either K (for kill) or S (for start), followed by a sequence
number that indicates the order in which init should kill or start the services. init first stops each of the
K* services in the order of their sequence numbers by executing each K script with the argument stop.
init then starts each of the S* services in the order of their sequence numbers by executing each S script
with the argument start. If symbolic links have the same sequence number, init stops or starts them in
alphabetic order.

Jef Adams

Jef Adams

[Jef@ToshibaZ30-Jef rc6.d]$ ls -al
total 8
drwxr-xr-x. 2 root root 4096 Dec 1 16:03 .
drwxr-xr-x. 10 root root 4096 Nov 20 11:59 ..
lrwxrwxrwx. 1 root root 15 Dec 1 16:03 K03rhnsd -> ../init.d/rhnsd
lrwxrwxrwx. 1 root root 15 Nov 19 17:07 K05jexec -> ../init.d/jexec
lrwxrwxrwx. 1 root root 19 Nov 19 15:36 K25vpnagentd -> ../init.d/vpnagentd
lrwxrwxrwx. 1 root root 13 Nov 19 16:06 K35cma -> ../init.d/cma
lrwxrwxrwx. 1 root root 15 Nov 19 17:07 K42nails -> ../init.d/nails
lrwxrwxrwx. 1 root root 20 Nov 19 14:40 K50netconsole -> ../init.d/netconsole
lrwxrwxrwx. 1 root root 17 Nov 19 16:20 K56pgpwded -> ../init.d/pgpwded
lrwxrwxrwx. 1 root root 17 Nov 19 14:40 K90network -> ../init.d/network
[Jef@ToshibaZ30-Jef rc6.d]$
–> A
C is obvious :from man page chkconfig

DESCRIPTION
chkconfig provides a simple command-line tool for maintaining the /etc/rc[0-6].d
directory hierarchy by relieving system administrators of the task of directly
manipulating the numerous symbolic links in those directories.

Correct answers are A,C