Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ inittab(5) — AIX PS/2 1.2.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

attributes

connect.con

environment

termio

su

pstart

pdisable

getty

login

init

stty



INITTAB(5,F)                AIX Technical Reference                INITTAB(5,F)



-------------------------------------------------------------------------------
inittab



PURPOSE

Describes the information used by the init process.

DESCRIPTION

The inittab file supplies the script to init's role as a general process
dispatcher.  The process that constitutes the majority of init's process
dispatching activities is the line process /etc/getty that initiates individual
terminal lines.  Other processes typically dispatched by init are daemons and
the shell.

Note:  If the Transparent Computing Facility is installed, each cluster site
       has its own version of inittab (/etc/inittab is a symbolic link into the
       local file system).

File Format

The inittab file consists of one or more named stanzas separated by blank
lines.  Each stanza begins with its name followed by a colon, and contains
assignments of values to keyword attributes.  The values, in turn, may be
alphanumeric strings or arbitrary character strings enclosed in double quotes.

Note:  In the multibyte environment, the inittab file stanzas may contain only
       ASCII characters.

inittab Parameters

The inittab keywords and their meanings are as follows:

id         This is one to four characters used to uniquely identify an entry.

level      This defines the run-level in which this stanza is to be processed.
           Run-levels effectively correspond to a configuration of processes in
           the system.  That is, each process spawned by init is assigned to a
           run-level or run-levels in which it is allowed to exist.  The
           run-levels are represented by a number ranging from 0 through 6.  As
           an example, if the system is in run-level 1, only those stanzas
           having a 1 in the level keyword are processed.  When init is
           requested to change run-levels, all processes which do not have an
           entry in the level keyword for the target run-level will be sent the
           warning signal (SIGTERM) and allowed a 20-second grace period before
           being forcibly terminated by a kill signal (SIGKILL).  The level
           keyword can define multiple run-levels for a process by selecting
           more than one run-level in any combination from 0 through 6.  If no
           run-level is specified, then action will be taken on this process
           for all run-levels 0-6.  There are three other values, a, b, and c,



Processed November 7, 1990       INITTAB(5,F)                                 1





INITTAB(5,F)                AIX Technical Reference                INITTAB(5,F)



           which can appear in the level keyword, even though they are not true
           run-levels.  Stanzas which have these characters in the level
           keyword are processed only when the telinit (see the init command in
           AIX Operating System Commands Reference) process requests them to be
           run (regardless of the current run-level of the system).  They
           differ from run-levels in that the system is only in these states
           for as long as it takes to execute all the stanzas associated with
           the states.  A process started by an a, b or c command is not killed
           when init changes levels.  They are only killed if their stanza in
           /etc/inittab is marked off in the action keyword, their stanza is
           deleted entirely from /etc/inittab, or init goes into the SINGLE
           USER state.

action     Values for this keyword tell init how to treat the process specified
           in the command keyword.  The actions recognized by init are as
           follows:

           respawn     If the process does not exist then start the process, do
                       not wait for its termination (continue scanning the
                       inittab file), and, when it dies, restart the process.
                       If the process currently exists, then do nothing and
                       continue scanning the inittab file.

           wait        Upon init's entering the run-level that matches the
                       stanza's level, start the process and wait for its
                       termination.  All subsequent reads of the inittab file
                       while init is in the same run-level will cause init to
                       ignore this stanza.

           once        Upon init's entering a run-level that matches the
                       stanza's level, start the process, do not wait for its
                       termination and when it dies, do not restart the
                       process.  If upon entering a new run-level, where the
                       process is still running from a previous run-level
                       change, the program is not restarted.

           boot        The stanza is to be processed only at init's boot-time
                       read of the inittab file.  init is to start the process,
                       not wait for its termination, and when it dies, not
                       restart the process.  In order for this instruction to
                       be meaningful, the level should be the default or it
                       must match init's run-level at boot time.  This action
                       is useful for an initialization function following a
                       hardware reboot of the system.

           bootwait    The stanza is to be processed only at init's boot-time
                       read of the inittab file.  init is to start the process,
                       wait for its termination and, when it dies, not restart
                       the process.






Processed November 7, 1990       INITTAB(5,F)                                 2





INITTAB(5,F)                AIX Technical Reference                INITTAB(5,F)



           powerfail   Execute the process associated with this stanza only
                       when init receives a power fail signal (SIGPWR); see
                       "sigaction, sigvec, signal."

           powerwait   Execute the process associated with this stanza only
                       when init receives a power fail signal (SIGPWR) and wait
                       until it terminates before continuing any processing of
                       inittab.

           off         If the process associated with this stanza is currently
                       running, send the warning signal (SIGTERM) and wait 20
                       seconds before forcibly terminating the process via the
                       kill signal (SIGKILL).  If the process is nonexistent,
                       ignore the stanza.

           ondemand    This instruction is really a synonym of the respawn
                       action.  It is functionally identical to respawn but is
                       given a different name in order to divorce its
                       association with run-levels.  This is used only with the
                       a, b or c values described in the level keyword.

           initdefault A stanza with this action is only scanned when init is
                       initially invoked.  init uses this entry, if it exists,
                       to determine which run-level to enter initially.  It
                       does this by taking the highest run-level specified in
                       the level keyword and using that as its initial state.
                       If the level keyword is empty, this is interpreted as
                       0123456 and so init will enter a run-level 6.  Also, the
                       stanza with the initdefault action can specify s or S in
                       the level keyword to indicate that init is to start in
                       the SINGLE USER state.  Additionally, if init doesn't
                       find an initdefault stanza in /etc/inittab, then it will
                       request an initial run-level from the user at reboot
                       time.

           sysinit     Stanzas with this action are executed before init tries
                       to access the console.  It is expected that this stanza
                       will be used to initialize devices on which init might
                       try to ask the run-level question.  These stanzas are
                       executed and waited for before continuing.

command    This is an sh command to be executed.

comment    The text that follows is a comment.  If the text includes a space
           (you have two or more words), then the test must be quoted.  The
           commands WHO -l and WHO -u print the comment.

EXAMPLE

The following example of an inittab file illustrates some of its features:





Processed November 7, 1990       INITTAB(5,F)                                 3





INITTAB(5,F)                AIX Technical Reference                INITTAB(5,F)



  *
  idef:
       id = idef
       level = 2
       action = initdefault
       command = "# default state: multi user"
  *
  sys1:
       id = sys1
       level = NULL
       action = sysinit
       command = "/etc/init.dir/shx Boot2singl"
  *
  mul1:
       id = mul1
       level = 2
       action = wait
       command = "/bin/kill -9 -1"
  *
  mul2:
       id = mul2
       level = 2
       action = wait
       command = "/etc/init.dir/shx Singl2multi"
  *
  sin1:
       id = sin1
       level = 03
       action = wait
       command = "/etc/init.dir/shx Multi2singl"
  *
  sin2:
       id = sin2
       level = 03
       action = wait
       command = "/bin/kill -15 -1"



















Processed November 7, 1990       INITTAB(5,F)                                 4





INITTAB(5,F)                AIX Technical Reference                INITTAB(5,F)



  *
  sin3:
       id = sin3
       level = 03
       action = wait
       command = "sleep 10"
  *
  *
  sin4:
       id = sin4
       level = 03
       action = wait
       command = "/bin/kill -9 -1"
  *
  sin5:
       id = sin5
       level = 03
       action = wait
       command = "/etc/init.dir/shx Filesystems down"
  *
  sin6:
       id = sin6
       level = 3
       action = wait
       command = "/etc/init s </dev/console >/dev/console 2>&1"
  *
  hlt0:
       id = hlt0
       level = 0
       action = wait
       command = "/etc/haltsys"
  *
  lds:
       id = lds
       level = 4
       action = respawn
       command = "/etc/loadserver"
  *
  console:
       id = con
       action = respawn
       level = 14
       command = "/etc/getty console"
  *
  tty00:
       id = tt0
       action = respawn
       level = 14
       command = "/etc/getty tty00"
  *
  *




Processed November 7, 1990       INITTAB(5,F)                                 5





INITTAB(5,F)                AIX Technical Reference                INITTAB(5,F)



  tty01:
       id = tt1
       action = off
       level = 14
       command = "/etc/getty tty01"
       comment = "modem line"

FILES

/etc/inittab
/etc/locks

RELATED INFORMATION

In this book:  "attributes,"  "connect.con," "environment," and  "termio."

The su, pstart, pdisable, getty, login, init, and stty commands in AIX
Operating System Commands Reference.

"Introduction to International Character Support" in Managing the AIX Operating
System.


































Processed November 7, 1990       INITTAB(5,F)                                 6



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026