Datasheet

“main” (Installation and Administration) 2004/6/25 13:29 page 269 #295
i
i
i
i
i
i
i
i
11
The SUSE LINUX Boot Concept
11.4 Init Scripts
There are two types of scripts in /etc/init.d/:
Scripts executed directly by init. This is the case only during the boot
process or if an immediate system shutdown is initiated (power fail-
ure or a user pressing
Ctrl -
Alt -
Del ). For IBM S/390 and zSeries sys-
tems, this is the case only during the boot process or if an immediate
system shutdown is initiated (power failure or via “signal quiesce”).
Scripts executed indirectly by init. These are run when changing the
runlevel and always call the master script /etc/init.d/rc, which guar-
antees the correct order of the relevant scripts.
All scripts are located in /etc/init.d/. Scripts for changing the runlevel
are also found there, but are called through symbolic links from one of the
subdirectories (/etc/init.d/rc0.d/ to /etc/init.d/rc6.d/). This
is just for clarity reasons and avoids duplicate scripts (e.g., if they are used
in several runlevels). Because every script can be executed as both a start
and a stop script, these scripts must understand the parameters start and
stop. The scripts also understand the restart, reload, force-reload,
and status options. These different options are explained in Table 11.2.
Table 11.2: Possible init Script Options
Option Description
start Start service.
stop Stop service.
restart If the service is running, stop it then restart it. If it
is not running, start it.
reload Reload the configuration without stopping and
restarting the service.
force-reload Reload the configuration if the service supports
this. Otherwise, do the same as if restart had
been given.
status Show current status of service.
269SUSE LINUX Enterprise Server