Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

System Administration Guide: Basic Administration
Previous Next

/etc/inittab File

When you boot the system or change run levels with the init or shutdown command, the init daemon starts processes by reading information from the /etc/inittab file. This file defines these important items for the init process:

  • That the init process will restart

  • What processes to start, monitor, and restart if they terminate

  • What actions to take when the system enters a new run level

Each entry in the /etc/inittab file has the following fields:

id:rstate:action:process

The following table describes the fields in an inittab entry.

Table 16-4 Fields Descriptions for the inittab File

Field

Description

id

Is a unique identifier for the entry.

rstate

Lists the run levels to which this entry applies.

action

Identifies how the process that is specified in the process field is to be run. Possible values include: sysinit, boot, bootwait, wait, and respawn.

For a description of the other action keywords, see inittab(4).

process

Defines the command or script to execute.

Example 16-2 Default inittab File

The following example shows a default inittab file that is installed with the Solaris release. A description for each line of output in this example follows.

ap::sysinit:/sbin/autopush -f /etc/iu.ap  (1)
sp::sysinit:/sbin/soconfig -f /etc/sock2path             (2)
smf::sysinit:/lib/svc/bin/svc.startd    >/dev/msglog 2<>/dev/msglog      (3)
p3:s1234:powerfail:/usr/sbin/shutdown -y -i5 -g0 >/dev/msglog 2<>/dev/...(4)
  1. Initializes STREAMS modules

  2. Configures socket transport providers

  3. Initializes the master restarter for SMF

  4. Describes a power fail shutdown

What Happens When the System Is Brought to Run Level 3

  1. The init process is started and reads the /etc/default/init file to set any environment variables. By default, only the TIMEZONE variable is set.

  2. Then, init reads the inittab file and does the following:

    1. Executes any process entries that have sysinit in the action field so that any special initializations can take place before users login.

    2. Passes the startup activities to svc.startd.

    For a detailed description of how the init process uses the inittab file, see init(1M).

Previous Next

 
 
  Published under the terms fo the Public Documentation License Version 1.01. Design by Interspire