inittab.4 (2010 09)

i
inittab(4) inittab(4)
NAME
inittab - script for the boot init
process
DESCRIPTION
The
/etc/inittab file supplies the script to the boot
init daemon in its role as a general process
dispatcher (see init (1M)). The process that constitutes the majority of boot
init’s process dispatching
activities is the line process
/usr/sbin/getty
that initiates individual terminal lines. Other
processes typically dispatched by boot
init are daemons and shells.
The
inittab file is composed of entries that are position-dependent and have the following format:
id
:rstate :action :process
Each entry is delimited by a newline; however, a backslash (
\) preceding a newline indicates a continua-
tion of the entry. Up to 1024 characters per entry are permitted. Comments can be inserted in the pro-
cess field by starting a "word" with a
# (see sh(1)). Comments for lines that spawn getty
s are displayed
by the
who command (see who(1)). It is expected that they will contain some information about the line
such as the location. There are no limits (other than maximum entry size) imposed on the number of
entries within the inittab file.
The entry fields are:
id A one- to four-character value used to uniquely identify an entry. Duplicate entries
cause an error message to be issued, but are otherwise ignored. The use of a four-
character value to identify an entry is strongly recommended (see WARNINGS below).
rstate Defines the run level in which this entry is to be processed. Run levels correspond to a
configuration of processes in the system where each process spawned by boot init is
assigned one or more run levels in which it is allowed to exist. Run levels are
represented by a number in the range 0 through 6. For example, if the system is in run
level 1, only those entries having a 1 in their rstate field are processed.
When boot
init is requested to change run levels, all processes that do not have an
entry in the rstate field for the target run level are sent the warning signal (
SIGTERM)
and allowed a 20-second grace period before being forcibly terminated by a kill signal
(
SIGKILL). You can specify multiple run levels for a process by entering more than one
run level value in any combination. If no run level is specified, the process is assumed to
be valid for all run levels, 0 through 6.
Three other values,
a, b and c, can also appear in the rstate field, even though they are
not true run levels. Entries having these characters in the rstate field are processed only
when a user init process requests them to be run (regardless of the current system run
level). They differ from run levels in that boot init 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
numeric run level.
Furthermore, a process started by an
a, b,orc option is not killed when boot init
changes levels. A process is killed only if its line in inittab is marked off in the
action field, its line is deleted entirely from inittab, or boot init goes into the single-
user state.
action A keyword in this field tells boot
init how to treat the process specified in the process
field. The following actions can be specified:
boot Process the entry only at boot init’s boot-time read of the inittab
file. Boot init starts the process, does not wait for its termination,
and when it dies, does not restart the process. In order for this
instruction to be meaningful, the rstate should be the default or it
must match boot init’s run level at boot time. This action is useful
for an initialization function following a hardware boot of the system.
bootwait Process the entry only at boot init’s boot-time read of the inittab
file. Boot init starts the process, waits for its termination, and,
when it dies, does not restart the process.
initdefault An entry with this action is only scanned when boot init is initially
invoked. Boot init uses this entry, if it exists, to determine which
run level to enter initially. It does this by taking the highest run level
specified in the rstate field and using that as its initial state. If the
HP-UX 11i Version 3: September 2010 1 Hewlett-Packard Company 1

Summary of content (2 pages)