Information Technology Reference
In-Depth Information
Table 2.7
Keywords of the /etc/inittab Action Field
Keyword
Meaning
boot
Execute process once when the init program reads the /etc/inittab file.
Do not wait for process to terminate and do not restart it when it exits.
bootwait
Execute process the first time the system run level changes from single
user to multi-user. Wait for process to terminate, but do not restart it
when it exits.
initdefault
Special keyword to identify the default run level, which is specified in the
rstate field.
off
If process is executing, warn of pending termination by sending it a
SIGTERM signal, wait five seconds, and then kill process by sending it a
SIGKILL signal.
once
Execute process when the system enters any of the run levels specified
in the rstate field. Do not wait for process to terminate and do not restart
it when it exits. If process is still running from a previous run level, do
not restart process .
ondemand
Similar to respawn but not associated with a run level. Only used with a,
b, or c in the rstate field.
powerfail
Execute process when init receives a SIGPWR (power failure) signal.
powerwait
Execute process when init receives a SIGPWR signal, but wait for
process to terminate before continuing.
respawn
Execute process if it is not running. Do not wait for it to terminate, but
restart it if it does.
sysint
Execute process that is used to initialize devices that init may use to ask
about run level changes (such as the system console). Wait for process
to terminate before continuing.
wait
Execute process and wait for it to terminate.
The following listing shows a sample of the default Solaris 9 /etc/inittab file.
ap::sysinit:/sbin/autopush -f /etc/iu.ap
ap::sysinit:/sbin/soconfig -f /etc/sock2path
fs::sysinit:/sbin/rcS sysinit >/dev/msglog 2<>/dev/msglog </dev/console
is:3:initdefault:
p3:s1234:powerfail:/usr/sbin/shutdown -y -i5 -g0 >/dev/msglog 2<>/dev/msglog
sS:s:wait:/sbin/rcS >/dev/msglog 2<>/dev/msglog </dev/console
s0:0:wait:/sbin/rc0 >/dev/msglog 2<>/dev/msglog </dev/console
s1:1:respawn:/sbin/rc1 >/dev/msglog 2<>/dev/msglog </dev/console
s2:23:wait:/sbin/rc2 >/dev/msglog 2<>/dev/msglog </dev/console
s3:3:wait:/sbin/rc3 >/dev/msglog 2<>/dev/msglog </dev/console
s5:5:wait:/sbin/rc5 >/dev/msglog 2<>/dev/msglog </dev/console
s6:6:wait:/sbin/rc6 >/dev/msglog 2<>/dev/msglog </dev/console
fw:0:wait:/sbin/uadmin 2 0 >/dev/msglog 2<>/dev/msglog </dev/console
of:5:wait:/sbin/uadmin 2 6 >/dev/msglog 2<>/dev/msglog </dev/console
rb:6:wait:/sbin/uadmin 2 1 >/dev/msglog 2<>/dev/msglog </dev/console
sc:234:respawn:/usr/lib/saf/sac -t 300
co:234:respawn:/usr/lib/saf/ttymon -g -h -p “`uname -n`
console login: “ -T sun -d /dev/console -l console -m ldterm,ttcompat
Search WWH ::




Custom Search