Chapter 33. Boot Process, Init, and Shutdown
358
Note
After the system is finished booting, it is possible to log in as root and execute these same
scripts to start and stop services. For instance, the command
/etc/rc.d/init.d/
httpd stop
stops the Apache HTTP Server.
Each of the symbolic links are numbered to dictate start order. The order in which the services are
started or stopped can be altered by changing this number. The lower the number, the earlier it is
started. Symbolic links with the same number are started alphabetically.
Note
One of the last things the
init
program executes is the
/etc/rc.d/rc.local
file.
This file is useful for system customization. Refer to
Section 33.3, “Running Additional
Programs at Boot Time”
for more information about using the
rc.local
file.
After the
init
command has progressed through the appropriate
rc
directory for the runlevel, the
/etc/inittab
script forks an
/sbin/mingetty
process for each virtual console (login prompt)
allocated to the runlevel. Runlevels 2 through 5 have all six virtual consoles, while runlevel 1 (single
user mode) has one, and runlevels 0 and 6 have none. The
/sbin/mingetty
process opens
communication pathways to
tty
devices
2
, sets their modes, prints the login prompt, accepts the user's
username and password, and initiates the login process.
In runlevel 5, the
/etc/inittab
runs a script called
/etc/X11/prefdm
. The
prefdm
script
executes the preferred X display manager
3
—
gdm
,
kdm
, or
xdm
, depending on the contents of the
/
etc/sysconfig/desktop
file.
Once finished, the system operates on runlevel 5 and displays a login screen.
33.3. Running Additional Programs at Boot Time
The
/etc/rc.d/rc.local
script is executed by the
init
command at boot time or when changing
runlevels. Adding commands to the bottom of this script is an easy way to perform necessary tasks
like starting special services or initialize devices without writing complex initialization scripts in the
/
etc/rc.d/init.d/
directory and creating symbolic links.
The
/etc/rc.serial
script is used if serial ports must be setup at boot time. This script runs
setserial
commands to configure the system's serial ports. Refer to the
setserial
man page for
more information.
33.4. SysV Init Runlevels
The SysV init runlevel system provides a standard process for controlling which programs
init
launches or halts when initializing a runlevel. SysV init was chosen because it is easier to use and
more flexible than the traditional BSD-style init process.
The configuration files for SysV init are located in the
/etc/rc.d/
directory. Within this directory,
are the
rc
,
rc.local
,
rc.sysinit
, and, optionally, the
rc.serial
scripts as well as the following
directories:
2
Refer to the Red Hat Enterprise Linux Deployment Guide for more information about
tty
devices.
3
Refer to the Red Hat Enterprise Linux Deployment Guide for more information about display managers.
Содержание ENTERPRISE LINUX 5 - VIRTUAL SERVER ADMINISTRATION
Страница 12: ...xii ...
Страница 20: ......
Страница 30: ...12 ...
Страница 32: ...14 ...
Страница 82: ...64 ...
Страница 106: ...88 ...
Страница 122: ...104 ...
Страница 124: ...106 ...
Страница 126: ......
Страница 132: ...114 ...
Страница 168: ...150 ...
Страница 182: ...164 ...
Страница 192: ...174 ...
Страница 194: ......
Страница 236: ...218 ...
Страница 238: ...220 ...
Страница 270: ......
Страница 274: ...256 ...
Страница 278: ...260 ...
Страница 292: ...274 ...
Страница 294: ......
Страница 300: ...282 ...
Страница 304: ......
Страница 316: ...298 ...
Страница 357: ...Creating Partitions 339 Figure 32 7 Creating a Software RAID Device 4 Click OK to add the device to the list ...
Страница 370: ...352 ...
Страница 384: ...366 ...
Страница 385: ...Part VII Appendix ...
Страница 386: ......