Controls the initialization process.
The /etc/inittab file supplies the script to the init command's role as a general process dispatcher. The process that constitutes the majority of the init command's process dispatching activities is the /etc/getty line process, which initiates individual terminal lines. Other processes typically dispatched by the init command are daemons and the shell.
The /etc/inittab file is composed of entries that are position-dependent and have the following format:
Note: The colon character ( : ) is used as a delimiter as well as a comment character. To comment out an inittab entry, add : at the beginning of the entry. For example:
Each entry is delimited by a newline character. A backslash (\) preceding a newline character indicates the continuation of an entry. There are no limits (other than maximum entry size) on the number of entries in the /etc/inittab file. The maximum entry size is 1024 characters. The entry fields are:
|Identifier||A string (one or more than one character) that uniquely identifies an object.|
|RunLevel|| The run level in which this entry can be processed. Run levels
effectively correspond to a configuration of processes in the system. Each
process started by the init command is assigned one or more run levels
in which it can exist. Run levels are represented by the numbers 0 through 9.
For example, if the system is in run level 1, only those entries with a 1 in
the runlevel field are started. When you request the init
command to change run levels, all processes without an entry in the
runlevel field for the target run level receive a warning signal
(SIGTERM). There is a 20-second grace period before processes are
forcibly terminated by the kill signal (SIGKILL). The runlevel
field can define multiple run levels for a process by selecting more than one
run level in any combination from 0 through 9. If no run level is specified,
the process is assumed to be valid at all run levels.
There are three other values that appear in the runlevel field, even though they are not true run levels: a, b, and c. Entries that have these characters in the runlevel field are processed only when the telinit command requests them to be run (regardless of the current run level of the system). They differ from run levels in that the init command can never enter run level a, b, or c. Also, a request for the execution of any of these processes does not change the current run level. Furthermore, a process started by an a, b, or c command is not killed when the init command changes levels. They are only killed if their line in the /etc/inittab file is marked off in the action field, their line is deleted entirely from /etc/inittab, or the init command goes into single-user mode.
|Action|| Tells the init command how to treat the process specified in
the process field. The following actions are recognized by the
|Command|| A shell command to execute. The entire command field is
prefixed with exec and passed to a forked sh as
sh -c exec command. Any legal sh syntax
can appear in this field. Comments can be inserted with the
# comment syntax.
The getty command writes over the output of any commands that appear before it in the inittab file. To record the output of these commands to the boot log, pipe their output to the alog -tboot command.
The stdin, stdout and stdferr file descriptors may not be available while init is processing inittab entries. Any entries writing to stdout or stderr may not work predictably unless they redirect their output to a file or to /dev/console.
The following commands are the only supported method for modifying the records in the /etc/inittab file:
|chitab||Changes records in the /etc/inittab file.|
|lsitab||Lists records in the /etc/inittab file.|
|mkitab||Adds records to the /etc/inittab file.|
|rmitab||Removes records from the /etc/inittab file.|
rc:2:wait:/etc/rc 2>&1 | alog -tboot > /dev/console
This file is part of Base Operating System (BOS) Runtime.
|/etc/inittab||Specifies the path of the inittab file.|
|/usr/sbin/getty||Indicates terminal lines.|
The chitabcommand, init command, lsitab command, mkitab command, rmitab command, telinit command.