Customizing UNIX system startup

Preparing the system state change

Following early initialization, the system must be placed in a particular system state. First, init scans each entry in the /etc/inittab file for the value initdefault in the third field (the ``action'' field). Including the value initdefault in the third field of an entry means the default system state is defined in the second field of that entry. For example, in the first line of ``System state 3 processes'', the 3 in the second field, followed by the value initdefault in the third field, means the default system state for this system is system state 3 (networking state).

NOTE: The examples shown here are specific to system state 3, but processing for system state 2 (multiuser state) is very similar.

Once init has identified the default system state as either system state 2 or system state 3, it searches the table for all entries that specify processes for the applicable system state. Typical system state 3 entries are shown in ``System state 3 processes''.

   onl:1234:wait:/sbin/psradm -n -a
   r2:23:wait:/sbin/rc2 > /dev/sysmsg 2>&1 </dev/console
   r3:3:wait:/sbin/rc3 > /dev/sysmsg 2>&1 </dev/console
   li:23:wait:/usr/bin/ln /dev/systty /dev/syscon >/dev/null 2>&1
   sc:234:respawn:/usr/lib/saf/sac -t 300
   co:12345:respawn:/usr/lib/saf/ttymon -g -p "Console Login: "
      -d /dev/console -l console
   d2:23:wait:/sbin/dinit >/dev/console 2>&1 </dev/console
   co:12345:once:/etc/mpchan >/dev/console 2>&1

System state 3 processes

The processes defined in these entries are executed before the system enters the networking system state during powerup or reboot. (See ``System state directories''.)

The second line shown in ``System state 3 processes'' calls the rc2 script. The rc2 script accomplishes (among other things) the following:

Next, init calls the rc3 script. The rc3 script starts NFS, mounts remote resources, and offers your resources automatically.

Then, init searches the /etc/inittab file for system state 3 processes and executes them in the order found in the file. In this example, init performs the following functions:

The system is now available for users to log on as shown by the login: prompt that appears on users' terminals.

Finally, /etc/inittab calls the dinit script. It completes initialization of processes that can be delayed until after a login prompt is displayed (thus reducing the amount of time a user has to wait for the prompt). The directory /etc/dinit.d contains the initialization scripts for each of these processes. These include:

When this is complete, the full networking environment is established and the system is in system state 3.

Next topic: About system states
Previous topic: Sample sysinit entries in an /etc/inittab file

© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 - 02 June 2005