Datasheet
“main” (Installation and Administration) — 2004/6/25 — 13:29 — page 270 — #296
i
i
i
i
i
i
i
i
Links in each runlevel-specific subdirectory make it possible to associate
scripts with different runlevels. When installing or uninstalling packages,
such links are added and removed with the help of the program insserv
(or using /usr/lib/lsb/install_initd, which is a script calling this
program). See the manual page of insserv for details.
Below is a short introduction to the boot and stop scripts launched first (or
last, respectively) as well as an explanation of the maintaining script.
boot Executed while starting the system directly using init. It is inde-
pendent of the chosen runlevel and is only executed once. Here, the
proc/ and pts/ file systems are mounted and the blogd (boot log-
ging daemon) is activated. If the system is booted for the first time
after an update or an installation, the initial system configuration is
started.
The blogd daemon is a service started by boot and by rc before
any other one. It is stopped after the actions triggered by the above
scripts (running a number of subscripts, for example) are com-
pleted. The blogd daemon writes any screen output to the log file
/var/log/boot.msg — but only if and when /var is mounted
read-write. Otherwise, blogd buffers all screen data until /var/ be-
comes available. Further information about blogd can be obtained
with man blogd.
The script boot is also responsible for starting all the scripts in
/etc/init.d/boot.d/ with a name that starts with S. There, the
file systems are checked and loop devices are configured if needed.
The system time is also set. If an error occurs while automatically
checking and repairing the file system, the system administrator can
intervene after first entering the root password. Last executed is the
script boot.local.
boot.local Here, enter additional commands to execute at boot before
changing into a runlevel. It can be compared to AUTOEXEC.BAT on
DOS systems.
boot.setup This script is executed when changing from single user
mode to any other runlevel and is responsible for a number of ba-
sic settings, such the keyboard layout and initialization of the virtual
consoles.
halt This script is only executed while changing into runlevel 0 or 6.
Here, it is executed either as halt or as reboot. Whether the system
shuts down or reboots depends on how halt is called.
270 11.4. Init Scripts










