idmkinit(1M) —
NAME
idmkinit − read files containing specifications
SYNOPSIS
/etc/conf/bin/idmkinit
DESCRIPTION
This command reads the files containing specifications of /etc/inittab entries from /etc/conf/init.d and constructs a new inittab file in /etc/conf/cf.d. It returns 0 on success and a positive number on error.
The files in /etc/conf/init.d are copies of the Init modules in device Driver Software Packages (DSP). There is at most one Init file per DSP. Each file contains one line for each inittab entry to be installed. There may be multiple lines (i.e., multiple inittab entries) per file. An inittab entry has the form:
id:rstate:action:process
(The id field in the above example is often called the tag.)
The Init module entry must have one of the following forms:
action:process
rstate:action:process
id:rstate:action:process
When idmkinit encounters an entry of the first type, a valid id field will be generated, and an rstate field of 2 (indicating run on “initstate 2”) will be generated. When an entry of the second type is encountered, only the id field is prefixed. An entry of the third type is incorporated into the new inittab unchanged.
Since add-on inittab entries specify init state 2 for their rstate field most often, an entry of the first type should almost always be used. An entry of the second type may be specified if you need to specify other than state 2. DSPs should avoid specifying the id field as in the third entry since other add-on applications or DSPs may have already used the id value you have chosen. The /etc/init program will encounter serious errors if one or more inittab entries contain the same id field.
idmkinit determines which of the three forms above is being used for the entry by requiring each entry to have a valid action keyword. Valid action values are as follows:
off
respawn
ondemand
once
wait
boot
bootwait
powerfail
powerwait
initdefault
sysinit
The idmkinit command is called automatically upon entering init state 2 on the next system reboot after a kernel reconfiguration to establish the correct /etc/inittab for the running /unix kernel. idmkinit can be called as a user-level command to test modification of inittab before a DSP is actually built. It is also useful in installation scripts that do not reconfigure the kernel but need to create inittab entries. In this case, the inittab generated by idmkinit must be copied to /etc/inittab, and a telinit q command must be run to make the new entry take effect.
The command line options are
−o directory inittab will be created in the directory specified rather than /etc/conf/cf.d.
−i directory The ID file init.base, which normally resides in /etc/conf/cf.d, can be found in the directory specified.
−e directory The Init modules that are usually in /etc/conf/init.d can be found in the directory specified.
−# Print debugging information.
Enhanced Functionality
Files in /etc/conf/init.d that have the same name as a DSP driver will only be included in /etc/inittab if the driver is configured. All of the other files in /etc/conf/init.d will always be included.
EXAMPLE
/etc/conf/init.d/foo will always be included in /etc/inittab, providing there is no driver named foo.
/etc/conf/init.d/asy will only be included in /etc/inittab if asy is configured in the sdevice file.
ERROR MESSAGES
An exit value of zero indicates success. If an error was encountered, idmkinit will exit with a nonzero value and report an error message. All error messages are designed to be self-explanatory.
SEE ALSO
chkinittab(1M), idbuild(1), idinstall(1M), idmknod(1M), init(1M).
inittab(4).
ADDED VALUE
This entry, supplied by SunSoft, Inc., contains enhancements to UNIX System V.
\*U — Version 1.0