O'Reilly logo

LPI Linux Certification in a Nutshell, 3rd Edition by James Stanger, Bruno Gomes Pessanha, Stephen Addison Schneiter, Adam Haeder

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Overview of the /etc Directory Tree and the init Process

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:

/etc/rc.sysinit or /etc/init.d/rcS

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.

/etc/rc.local

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required