The rc Scripts

Under OpenLinux and Red Hat, you'll find all the system initialization scripts in /etc/rc.d. This subdirectory has more subdirectories, one for each runlevel: rc0.drc6.d and init.d. Within the /etc/rc.d/rc#.d subdirectories (where the # is replaced by a single-digit number) are symbolic links to the master scripts stored in /etc/rc.d/init.d. (See Listing 13.2 for a partial listing of files and subdirectories under /etc/rc.d.) The scripts in init.d take an argument of start or stop, and occasionally of reload or restart.

Code Listing 13.2. Partial Directory Listing of /etc/rc.d, /etc/rc.d/init.d, and /etc/rc.d/rcf2.d
 /etc/rc.d/ drwxr-xr-x 10 root root 1024 Jan 14 17:24 ./ drwxr-xr-x 41 root root 4096 Feb 29 11:14 ../ drwxr-xr-x ...

Get Special Edition Using Linux®, Sixth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.