mkitab Command
Purpose
Makes records in the /etc/inittab file.
Syntax
mkitab [ -i Identifier ] { [ Identifier ] : [ RunLevel ] : [ Action ] : [ Command ] }
Description
The mkitab command adds a record to the /etc/inittab file. The Identifier:RunLevel:Action:Command parameter string specifies the new entry to the /etc/inittab file. You can insert a record after a specific record using the -i Identifier flag. The command finds the field specified by the Identifier parameter and inserts the new record after the one identified by the -i Identifier flag.
Parameters
The Identifier:RunLevel:Action:Command parameter string specifies the record in the /etc/inittab file, as follows:
Item | Description |
---|---|
Identifier | A 14-character parameter that uniquely identifies an object. The Identifier must be unique. If the Identifier is not unique, the command is unsuccessful. The Identifier cannot be changed; if you try to change it, the command is unsuccessful. |
RunLevel | A 20-character parameter defining the run levels in which the Identifier can be processed. Each process started by the init command can be assigned one or more run levels in which it can be started. |
Action | A 20-character parameter that informs the init command
how to process the Command parameter that you specify. The init command
recognizes the following actions:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Command | A 1024-character field specifying the shell command. Attention: To avoid possible corruption
of system files, the stdin, stdout, and stderr files
must be specified in the Command parameter with redirection,
or they must be explicitly opened by the program being run by the
command line.
|
Flags
Item | Description |
---|---|
-i Identifier | Specifies which record in the /etc/inittab file the new record follows. |
Security
Attention RBAC users and Trusted AIX users: This command can perform privileged operations. Only privileged users can run privileged
operations. For more information about authorizations and privileges, see Privileged Command
Database in Security. For a list of privileges and the
authorizations associated with this command, see the lssecattr command or the
getcmdattr subcommand.
Examples
- To add a new record to
the /etc/inittab file, telling the init command to handle
a login on tty2, type:
mkitab "tty002:2:respawn:/usr/sbin/getty /dev/tty2"
- To add a new record to the /etc/inittab file,
telling the init command to execute the /etc/rc.tcpip file
after the /usr/sbin/srcmstr file is started, type:
mkitab -i srcmstr "rctcpip:2:wait:/etc/rc.tcpip > /dev/console"
- To add a new record
to the /etc/inittab file, telling the init command to
execute the /etc/rc file and send its output to the boot log,
type:
mkitab ((rc:2:wait:/etc/rc 2>&1 | alog -tboot > /dev/console))
Files
Item | Description |
---|---|
/etc/inittab | Contains the mkitab command. |