By themselves, the runlevels listed in Table 4-1 don’t mean much. It’s what the init process does as a result of a runlevel specification or change that affects the system. The actions of init for each runlevel are derived from the style of initialization in Unix System V and are specified in a series of directories and script files under the /etc directory.
When a Linux system starts, it runs a number of scripts in /etc to initially configure the system and switch among runlevels. System initialization techniques differ among Linux distributions. The examples in this section are typical of a Red Hat–based system. Any distribution compliant with the Linux Standards Base (LSB) should look similar. The following describe these files:
On Red Hat–based systems, rc.sysinit is a monolithic system initialization script. The Debian rcS script does the same job by running several small scripts placed in two different directories. In each case, the script is launched by init at boot time. It handles some essential chores to prepare the system for use, such as mounting filesystems. This script is designed to run before any system daemons are started.
This file is a script that is called after all other init scripts (after all system daemons are started). It contains local customizations affecting system startup and provides an alternative to modifying the other init scripts. Many administrators ...