In the multiuser state (run level 2), init scans the file for entries that have a tag (also 2) for the run level and executes everything after the third colon on the line containing the tag. For complete information, see the inittab(4) reference page.
The system /etc/inittab looks something like this:
This display has been edited for brevity; the actual /etc/inittab file is lengthy. If /etc/inittab is removed by mistake and is missing during shutdown, init enters the single-user state (init s). While entering single-user state, /usr remains mounted, and processes not spawned by init continue to run. Immediately replace /etc/inittab before changing states again. The format of each line in inittab is:is:2:initdefault: fs::sysinit:/etc/bcheckrc </dev/console >/dev/console 2>&1 mt::sysinit:/etc/brc </dev/console >/dev/console 2>&1 s0:06s:wait:/etc/rc0 >/dev/console 2>&1 </dev/console s1:1:wait:/etc/shutdown -y -iS -g0 >/dev/console 2>&1 </dev/console s2:23:wait:/etc/rc2 >/dev/console 2>&1 </dev/console s3:3:wait:/etc/rc3 >/dev/console 2>&1 </dev/console
or:06:wait:/etc/umount -ak -b /proc,/debug > /dev/console 2>&1of:0:wait:/etc/uadmin 2 0 >/dev/console 2>&1 </dev/console RB:6:wait:echo "The system is being restarted." >/dev/console rb:6:wait:/etc/uadmin 2 1 >/dev/console 2>&1 </dev/console #
id:level:action:process
where:
Run process before init sends anything to the system console (Console Login).
Start process the first time init goes from single-user to multiuser state after the system is started. (If initdefault is set to 2, the process runs right after the startup.) init starts the process, waits for its termination and, when it dies, does not restart the process.
When going to level, start process and wait until it has finished.
When init starts, it enters level; the process field for this action has no meaning.
Run process once. If it finishes, don't start it again.
Run process whenever a direct powerdown of the computer is requested.
If process does not exist, start it, wait for it to finish, and then start another.
Synonymous with respawn, but used only with level a, b, or c.
When in level, kill process or ignore it.