The inittab file is recreated automatically by idmkinit at boot time anytime the kernel has been reconfigured. To construct a new inittab file, idmkinit concatenates the device driver init files in /etc/conf/init.d onto the end of /etc/conf/init.d/kernel (the default inittab).
If you add an entry directly to inittab, the change exists only until the kernel is relinked. To add an entry permanently, you must also edit /etc/conf/init.d/kernel. The kernel file has the same format as inittab.
The inittab file is composed of entries that are position-dependent. Each entry is delimited by a new-line; however, a backslash (\) preceding a new-line indicates a continuation of the entry. Up to 512 characters per entry are permitted. Comments may be inserted in the ``process'' field using the sh convention for comments. Comments for lines that spawn gettys are displayed by the who command. 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 four fields per entry in inittab or /etc/conf/init.d/kernel are:
For example, init processes the entries which have a 2 (or no specified run-level) in this field when the system goes to run-level 2,
If no run-level is specified, the process is assumed to be valid at all run-levels. When the system first goes to single-user mode after being rebooted init only invokes entries which specify sysinit in their action field. Entries which specify (or imply) that they should be run when the system goes to single-user mode are only invoked when the system subsequently enters this run-level from one of run-levels 1 through 6. When init changes run-levels, it sends SIGTERM to processes which do not have an entry in this field for the target run-level (but not those without any entry). init allows these processes 20 seconds to die before being forcibly terminating them using SIGKILL.
Entries with values a, b, and c in this field are not true run-levels but are processed only when init requests them to be run (regardless of the current run-level of the system). They differ from run-levels in that 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 run-level. In addition, a process started by an a, b, or c command is not killed when init changes levels. They are only killed if their line in /etc/inittab is marked off in the action field, their line is deleted entirely from /etc/inittab, or init goes into the single-user state.
init recognizes the following actions: