Novell LINUX ENTERPRISE SERVER 10 - INSTALLATION AND ADMINISTRATION 11-05-2007 Installation Manual page 396

Table of Contents

Advertisement

2. init checks the current runlevel (runlevel) and determines it should start /etc/
init.d/rc with the new runlevel as a parameter.
3. Now rc calls the stop scripts of the current runlevel for which there is no start
script in the new runlevel. In this example, these are all the scripts that reside in
/etc/init.d/rc3.d (old runlevel was 3) and start with a K. The number
following K specifies the order to run the scripts with the stop parameter, because
there are some dependencies to consider.
4. The last things to start are the start scripts of the new runlevel. In this example,
these are in /etc/init.d/rc5.d and begin with an S. Again, the number that
follows the S determines the sequence in which the scripts are started.
When changing into the same runlevel as the current runlevel, init only checks /etc/
inittab for changes and starts the appropriate steps, for example, for starting a
getty on another interface. The same functionality may be achieved with the command
telinit q.
19.2.2 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 failure or a user pressing Ctrl + Alt + Del ). For IBM System z
systems, this is the case only during the boot process or if an immediate system
shutdown is initiated (power failure or via "signal quiesce"). The execution of these
scripts is defined in /etc/inittab.
Scripts Executed Indirectly by init
These are run when changing the runlevel and always call the master script
/etc/init.d/rc, which guarantees the correct order of the relevant scripts.
All scripts are located in /etc/init.d. Scripts that are run at boot time are called
through symbolic links from /etc/init.d/boot.d. Scripts for changing the run-
level 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 if they are used in several runlevels. Because every script can be exe-
cuted as both a start and a stop script, these scripts must understand the parameters
378
Installation and Administration

Advertisement

Table of Contents
loading

This manual is also suitable for:

Suse linux enterprise server 10

Table of Contents