hpux 10.20 - 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 continuation of the entry. Up to 1024
characters per entry are permitted. Comments can be inserted in the
process field by starting a "word" with a # (see sh(1)). Comments for
lines that spawn gettys 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, or c 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 rstate field is empty, boot init
enters run level 6.
The initdefault entry cannot specify
that boot init start in the single-
user state. Additionally, if boot
init does not find an initdefault
entry in inittab, it requests an
initial run level from the user at
boot time.
off If the process associated with this
entry is currently running, send the
warning signal (SIGTERM) and wait 20
seconds before forcibly terminating
the process via the kill signal
(SIGKILL). If the process is
nonexistent, ignore the entry.
once When boot init enters a run level
that matches the entry's rstate,
start the process and do not wait for
its termination. When it dies, do
not restart the process. If boot
init enters a new run level but the
process is still running from a
previous run level change, the
process is not restarted.
ondemand This instruction is really a synonym
for the respawn action. It is
functionally identical to respawn but
is given a different keyword in order
to divorce its association with run
levels. This is used only with the
a, b, or c values described in the
rstate field.
powerfail Execute the process associated with
this entry only when boot init
receives a power-fail signal (SIGPWR
see signal(5)).
powerwait Execute the process associated with
this entry only when boot init
receives a power-fail signal (SIGPWR)
and wait until it terminates before
continuing any processing of inittab.
respawn If the process does not exist, start
the process; do not wait for its
termination (continue scanning the
inittab file). When it dies, restart
the process. If the process
currently exists, do nothing and
continue scanning the inittab file.
sysinit Entries of this type are executed
before boot init tries to access the
console. It is expected that this
entry will be only used to initialize
devices on which boot init might
attempt to obtain run level
information. These entries are
executed and waited for before
continuing.
wait When boot init enters the run level
that matches the entry's rstate,
start the process and wait for its
termination. Any subsequent reads of
the inittab file while boot init is
in the same run level cause boot init
to ignore this entry.
process This is a sh command to be executed. The entire
process field is prefixed with exec and passed to a
forked sh as "sh -c 'exec command'". For this reason,
any sh syntax that can legally follow exec can appear
in the process field. Comments can be inserted by
using the ; #comment syntax.
WARNINGS
The use of a four-character id is strongly recommended. Many pty
servers use the last two characters of the pty name as an id. If an
id chosen by a pty server collides with one used in the inittab file,
the /etc/utmp file can become corrupted. A corrupt /etc/utmp file can
cause commands such as who to report inaccurate information.
FILES
/etc/inittab File of processes dispatched by boot init.
SEE ALSO
sh(1), getty(1M), exec(2), open(2), signal(5).