Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

getty(8)

init(8)

sh(1)

who(1)

exec(2)

open(2)

signal(2)



  inittab(4)                          CLIX                          inittab(4)



  NAME

    inittab - Script file for init process

  DESCRIPTION

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

    The inittab file is composed of entries that are position dependent and
    have the following format:

    id:rstate:action:process

    Each entry is delimited by a newline, however, a backslash (\) preceding a
    newline 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 getty
    processes 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 entry fields are as follows:

    id        Specifies one or two characters used to uniquely identify an
              entry.

    rstate    Defines the run-level in which this entry 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 run-levels in which it is allowed to exist.  For
              example, if the system is in run-level 1, only those entries
              having a 1 in the rstate field will be processed.  The run-
              levels are represented by a number ranging from 0 through 6.
              When init is requested to change run-levels, all processes that
              do not have an entry in the rstate field 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 rstate field can define multiple run-levels for a process by
              selecting more than one run-level in any combination from 0-6.
              If no run-level is specified, then the process is assumed to be
              valid at all run-levels.

              There are three other values (a, b and c) which can appear in
              the rstate field, even though they are not true run-levels.
              Entries which have these characters in the rstate field are
              processed only when the telinit (see init(8)) process requests



  2/94 - Intergraph Corporation                                              1






  inittab(4)                          CLIX                          inittab(4)



              them to be run.  They differ from true 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.  Processes started by an a, b or c command are not
              killed when init changes levels.  They are only killed on the
              following conditions:

              ⊕  Their line in the inittab file is marked off in the action
                 field.

              ⊕  Their line is deleted entirely from inittab.

              ⊕  The init command goes into the SINGLE USER state.

    action    Key words in this field tell init how to treat the process
              specified in the process field.  The actions recognized by init
              are as follows:

              respawn       Starts the process if it does not exist.  The init
                            command does not wait for the process to terminate
                            (it continues scanning the inittab file).  If the
                            process dies, it is restarted.  If the process
                            currently exists then init does nothing and
                            continues scanning the inittab file.

              wait          Starts the process and waits for its termination
                            when init enters the run-level that matches the
                            entry's rstate.  All subsequent reads of the
                            inittab file while init is in the same run-level
                            will cause init to ignore this entry.

              once          Starts the process and does not wait for its
                            termination when init enters a run-level that
                            matches the entry's rstate.  When the process
                            dies, it is not restarted.  If init enters a new
                            run-level where the process is still running from
                            a previous run-level change, the program will not
                            be restarted.

              boot          Processes the entry only at boot-time when init
                            reads the inittab file.  The init command starts
                            the process and does not wait for its termination.
                            When it dies, the process is not restarted.  In
                            order for this instruction to be meaningful, the
                            rstate should be the default or it must match the
                            run-level of init at boot time.  This action is
                            useful for an initialization function following a
                            hardware reboot of the system.

              bootwait      Processes the entry the first time init goes from
                            single-user to multiuser state after the system is



  2                                              Intergraph Corporation - 2/94






  inittab(4)                          CLIX                          inittab(4)



                            booted.  (If initdefault is set to 2, the process
                            will run right after the system is booted.)  The
                            init command starts the process, waits for its
                            termination and, when it dies, does not restart
                            the process.

              powerfail     Executes the process associated with this entry
                            only when init receives a power fail signal
                            (SIGPWR).  See signal(2).

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

              off           If the process associated with this entry is
                            currently running, sends the warning signal
                            (SIGTERM) and waits 20 seconds before forcibly
                            terminating the process with the kill signal
                            (SIGKILL).  If the process is nonexistent, ignores
                            the entry.

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

              initdefault   An entry with this action is only scanned when
                            init is initially invoked.  The init command 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 rstate
                            field and using that as its initial state.  If the
                            rstate field is empty, this is interpreted as
                            0123456, so init will enter run-level 6.
                            Additionally, if init does not find an initdefault
                            entry in the inittab file, then it will request an
                            initial run-level from the user at reboot time.

              sysinit       Entries of this type are executed before init
                            tries to access the console (that is, before the
                            Console Login: prompt).  It is expected that this
                            entry will be only used to initialize devices on
                            which init might try to ask the run-level
                            question.  These entries are executed and waited
                            for before continuing.

    process   Indicates a sh command to be executed.  The entire process field
              is prefixed with exec and passed to a forked sh as sh -c '"exec"



  2/94 - Intergraph Corporation                                              3






  inittab(4)                          CLIX                          inittab(4)



              " command"'.  For this reason, any legal sh syntax can appear in
              the process field.  Comments can be inserted with the ``; #
              comment'' syntax.

  FILES

    /etc/inittab

  RELATED INFORMATION

    Commands:  getty(8), init(8), sh(1), who(1)

    Functions:  exec(2), open(2), signal(2)









































  4                                              Intergraph Corporation - 2/94




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