


INITTAB(5)	  Linux Programmer's Manual	  INITTAB(5)


NNAAMMEE
       inittab	-  format  of  the inittab file used by the SysV-
       compatible init process

DDEESSCCRRIIPPTTIIOONN
       The inittab file describes which processes are started  at
       bootup  and  during  normal  operation (e.g. /etc/rc, get-
       tys...).	Init distinguishes multiple _r_u_n_l_e_v_e_l_s, of  which
       each  can  have its own set of processes that are started.
       Valid runlevels are 00-66	and  AA,	BB  and	CC  for	oonnddeemmaanndd
       entries.	An  entry in the inittab file has the following
       format:

	      _i_d:_r_u_n_l_e_v_e_l_s:_a_c_t_i_o_n:_p_r_o_c_e_s_s

       Lines beginning with `#' are ignored.

       _i_d     is a unique two-character-sequence which identifies
	      an entry in inittab.

	      Note:  For  gettys or other login processes, the _i_d
	      field should be the tty suffix of the corresponding
	      tty,   e.g.  11  for  ttttyy11.   Otherwise,  the  login
	      accounting will not work correctly.  This is a  bug
	      in login and will be fixed.

       _r_u_n_l_e_v_e_l_s
	      describes	in  which runlevels the specified action
	      should be taken.

       _a_c_t_i_o_n describes which action should be taken.

       _p_r_o_c_e_s_s
	      specifies the process to be executed.  If the  pro-
	      cess  field  starts with a `+' character, init will
	      not do utmp and wtmp accounting for  that	process.
	      This  is	needed	for  gettys  that insist on doing
	      their own utmp/wtmp housekeeping.	This is  also	a
	      historic bug.

       Valid actions are:

       rreessppaawwnn
	      The  process  will  be restarted whenever it termi-
	      nates (e.g. getty).

       wwaaiitt   The process will be started once when the specified
	      runlevel is entered and init will wait for its ter-
	      mination.

       oonnccee   The process will be executed once when  the  speci-
	      fied runlevel is entered.

       bboooott   The  process  will  be executed during system boot.



			   May 13, 1993				1





INITTAB(5)	  Linux Programmer's Manual	  INITTAB(5)


	      The _r_u_n_l_e_v_e_l field is ignored.

       bboooottwwaaiitt
	      The process will be executed  during  system  boot,
	      while   init   waits   for  its  termination  (e.g.
	      /etc/rc).	The _r_u_n_l_e_v_e_l field is ignored.

       ooffff    This does nothing.

       oonnddeemmaanndd
	      A process marked with an oonnddeemmaanndd runlevel will  be
	      executed	whenever  the specified ondemand runlevel
	      is called.  However, no runlevel change will occur.

       iinniittddeeffaauulltt
	      An  iinniittddeeffaauulltt-entry  specifies the runlevel which
	      should be	entered  after	system	boot.	If  none
	      exists,  init  will  ask for a runlevel on the con-
	      sole.

       ssyyssiinniitt
	      The process will be executed during system boot. It
	      will  be	executed  before  any  bboooott  or	bboooottwwaaiitt
	      entries.

       ppoowweerrwwaaiitt
	      The process will be executed when iinniitt receives the
	      SIGPWR  signal,  indicating that there is something
	      wrong with the power. IInniitt will wait for	the  pro-
	      cess to finish before continuing.

       ppoowweerrffaaiill
	      As  ppoowweerrwwaaiitt,  but init will not wait for the pro-
	      cesses completion.

       ppoowweerrookkwwaaiitt
	      The process will be executed when iinniitt receives the
	      SIGPWR  signal,  provided	there	is  a file called
	      //eettcc//ppoowweerrssttaattuuss containing the word OOKK. This means
	      that the power has come back again.

       ccttrrllaallttddeell
	      The process will be executed when iinniitt receives the
	      SIGINT signal.  This means that someone on the sys-
	      tem console has pressed the CCTTRRLL--AALLTT--DDEELL key combi-
	      nation. Typically one wants to execute some sort of
	      sshhuuttddoowwnn either to get into single-user level or to
	      reboot the machine.

       The _r_u_n_l_e_v_e_l-field may  contain	multiple  characters  for
       different  runlevels,  e.g.  112233	if the process should be
       started in runlevels 1, 2  and  3.   oonnddeemmaanndd-entries  may
       contain an AA, BB or CC.  The _r_u_n_l_e_v_e_l-field of ssyyssiinniitt, bboooott
       and bboooottwwaaiitt entries are ignored.



			   May 13, 1993				2





INITTAB(5)	  Linux Programmer's Manual	  INITTAB(5)


       When the runlevel is changed, any running  processes  that
       are  not	specified for the new runlevel are killed, first
       with SIGTERM, then with SIGKILL.

EEXXAAMMPPLLEESS
       This is an example of a inittab which  resembles	the  old
       Linux inittab:

	      # inittab for linux
	      id:1:initdefault:
	      rc::bootwait:/etc/rc
	      1:1:respawn:/bin/getty 9600 tty1
	      2:1:respawn:/bin/getty 9600 tty2
	      3:1:respawn:/bin/getty 9600 tty3
	      4:1:respawn:/bin/getty 9600 tty4

       This  inittab file executes //eettcc//rrcc during boot and starts
       gettys on tty1-tty4.

       A more elaborate inittab with different runlevels (see the
       comments inside):

	      # Level to run in
	      id:4:initdefault:
	      ud::boot:/etc/update
	      rc::bootwait:/etc/rc
	      cr::boot:/etc/crond
	      #
	      # level 1: getty on tty1
	      # level 2: getty on tty1-4
	      # level 3: tty1-4, dialin via modem(ttys2)
	      # level 4: tty1-4, ttyb
	      #
	      mr:126:once:/usr/bin/nodialin
	      mi:345:once:/usr/bin/dialin
	      1:1234:respawn:/bin/getty 9600 tty1
	      2:234:respawn:/bin/getty 9600 tty2
	      3:234:respawn:/bin/getty 9600 tty3
	      4:234:respawn:/bin/getty 9600 tty4
	      s2:3:respawn:/bin/mgetty ttys2 19200
	      b:4:respawn:/bin/getty 19200L ttyb
	      ca::ctrlaltdel:/bin/shutdown -t3 -rf now


FFIILLEESS
       /etc/inittab

AAUUTTHHOORR
       Init    was    written	by    Miquel	van   Smoorenburg
       (miquels@drinkel.nl.mugnet.org), the manual page was writ-
       ten by Sebastian Lederer (lederer@francium.informatik.uni-
       bonn.de)	and	modified	by     Michael	Haardt
       (u31b3hs@pool.informatik.rwth-aachen.de).




			   May 13, 1993				3





INITTAB(5)	  Linux Programmer's Manual	  INITTAB(5)


SSEEEE AALLSSOO
       init(8), telinit(8)























































			   May 13, 1993				4


