DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Customizing UNIX system startup

Early initialization

After the operating system is loaded into primary memory using the boot programs (see ``Understanding the boot process''), the init daemon is created. This process immediately scans /etc/inittab for entries of the type sysinit. A sample listing of these entries is shown in ``Sample sysinit entries in an /etc/inittab file''.

   vol1::sysinit:/etc/init.d/vxvm-sysboot </dev/sysmsg > /dev/sysmsg 2>&1 ##vxvm
   swp1::sysinit:/sbin/swap -a /dev/swap >/dev/sysmsg 2>&1
   cr::sysinit:/sbin/ckroot >/dev/sysmsg 2>&1
   mi::sysinit:/sbin/sh -c '[ -x /sbin/macinit ] && /sbin/macinit' >/dev/sysmsg 2>&1
   mm::sysinit:/etc/conf/bin/idmodreg -c `/etc/conf/bin/idkname -c` >/dev/null 2>&1
   ap::sysinit:/sbin/autopush -f /etc/ap/chan.ap
   ak::sysinit:/sbin/wsinit >/etc/wsinit.err 2>&1
   ls::sysinit:/sbin/loadfont >/dev/console 2>&1
   dcun::sysinit:/sbin/dcu -N >/dev/console 2>&1
   pdi1::sysinit:/etc/scsi/pdiunits -a >/dev/console 2>&1
   ldmd::sysinit:/etc/conf/bin/idmodload >/dev/console 2>&1
   vol2::sysinit:/etc/init.d/vxvm-startup </dev/sysmsg >/dev/sysmsg 2>&1 ##vxvm
   pdi2::sysinit:/etc/scsi/pdiunits -o >/dev/console 2>&1
   pdi3::sysinit:/etc/scsi/pdimkdev -s >/dev/console 2>&1
   pdi4::sysinit:/etc/scsi/pdi_timeout -b >/dev/console 2>&1
   swp2::sysinit:/sbin/swap -c >/dev/console 2>&1
   bchk::sysinit:/sbin/bcheckrc </dev/console >/dev/console 2>&1
   vol3::sysinit:/etc/init.d/vxvm-reconfig </dev/console >/dev/sysmsg 2>&1 ##vxvm
   ac::sysinit:/sbin/aconf1_sinit >/dev/console 2>&1
   key::sysinit:/sbin/sh -c '[ -x /sbin/keyadm ] && /sbin/keyadm -s' >/dev/console 2>&1
   bu::sysinit:/etc/conf/bin/idrebuild reboot </dev/console >/dev/console 2>&1
   me::sysinit:/etc/conf/bin/idmkenv >/dev/console 2>&1
   nd::sysinit:/etc/conf/bin/idmknodd >/dev/console 2>&1
   xdc::sysinit:/sbin/sh -c 'if [ -x /etc/rc.d/es_setup ] ; then /etc/rc.d/es_setup ; fi' >/dev/console 2>&1
   ia::sysinit:/sbin/creatiadb </dev/console >/dev/console 2>&1
   metr::sysinit:/sbin/sh -c '[ -x /sbin/metreg ] && /sbin/metreg' >/dev/console 2>&1

Sample sysinit entries in an /etc/inittab file

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

id:rstate:action:process

The definitions of the fields are:


id
One to four characters used to uniquely identify an entry.

rstate
Defines the run level in which the entry is to be processed. Run-levels correspond to a configuration of processes in the system; each process spawned by init is assigned 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.

action
Contains keywords that tell init how to treat the process specified in the process field. The actions recognized by init include this definition of sysinit:

sysinit
Entries with this action are scanned only when init is initially invoked. Among other things, sysinit entries may be used to initialize devices on which init might try to request an initial run level from the user. sysinit entries are executed and waited for before continuing.
See inittab(4) for definitions of the other keywords that can appear in the action field (respawn, wait, once, boot, init, bootwait, powerfail, powerwait, off, ondemand, and initdefault).

process
is a command to be executed. The entire process field is prefixed with exec and passed to a forked sh as sh -c 'exec command'. For this reason, any legal sh syntax can appear in the process field.

Next topic: Preparing the system state change
Previous topic: Entering the default state during powerup

© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 22 April 2004