#
# 	cLIeNUX  /etc/inittab     19980924-20000110 rah
#     main system initialization configuration, read by init
#     on bootup. For use with Miquel Van Smoorenberg's init.	
# 


# Real Unices(tm) call a bunch of scripts from here. In cLIeNUX that
# 	technique is LAAETTR ( Left As An Excercise To The Reader ). 

# cLIeNUX also doesn't do the whole fsck-if-not-cleanly-unmounted
# song and dance. My experience is that ext2 filesystem damage doesn't
# propagate, i.e. you lose what wasn't flushed, but your
# HD doesn't explode. For a client-use box I think reasonable reboot time
# is more important than absolute data persistance. The time
# cost of fsck is going up with HD size, and shouldn't happen at boot.
# C_A_D does a flush. Relax. As long as you don't just power-off 
# suddenly you'll be fine. ext2 is quite robust.

# The last thing the kernel does at bootup is call init (or sh).
# init reads this file, and then
# init manages processes based on this file. When a runlevel changes,
# init starts processes called for in that level and kills processes
# not enabled for that level. Runlevel changes may be caused by system
# signals to init, such as c-a-d, or with telinit or init as a command.
## For Dos refugees, the difference between this and AUTOEXEC.BAT
## is that init runs this, but doesn't go away. 
# Runlevels are entirely a function of init, i.e. "single-user" is how
# you define it here.  

# valid actions include......
#   respawn   	 init will respawn this process *in this runlevel*
#   wait	 do this on runlevel entry. wait for it to finish
#   once	 do this on entry
#   boot	 do this at system boot. runlevel field ignored
#   bootwait 	 at boot. don't fork. runlevel field ignored
#   initdefault the default runlevel to start at
#   sysinit     the very firstest thing at boot. runlevel field ignored
#   ctrlaltdel  the Vulcan plot-simplifier


#       Run  levels 0, 1 and 6 are special. Runlevel 0 is used to
#       halt the system, runlevel 6 is used to reboot  the  system
#       and  runlevel 1 is used to get the system down into single
#       user mode. shutdown can cause runlevel 0, 1 or 6.

# FORMAT...
#    ID:runlevels:action:process
#  ID is fairly arbitrary. Supposedly you should use integers for vt's.
# Concerning the format of this file, init thinks spaces at the
# beginnings of lines are ID fields. A # must *begin* a comment line,
# and so must ID fields. This is a nasty syntactic unix 
# overload-the-whitespace-operator gotcha. WATCH the blanks! 


# The first thing to run. init "single user". The runlevel field is ignored. 
sini::sysinit:/.bi/rm /.et/mtab

# Default runlevel to boot to.
## 7 is networks, no servers. Lower this first if you play around.

id:8:initdefault:/.bi/echo "entering default runlevel, 8"
## you can init 7 8 or 9 on the command line, or change this.

# init recieves the Vulcan Plot Simplifier (SIGINT) and calls a 
# process. telinit 6 = reboot.  Apparently CAD can be different from
# different runlevels. Maybe. LAAETTR.

cad:2345789:ctrlaltdel:/.bi/shutdown

# Runlevel 0 halts the system.
l0:0:wait:/.sbi/halt -f

# Runlevels 2 3 4 5 7 8 and 9 have no inate action by init other than
# what you tell init here. Runlevels a b and c do not enforce runlevel
# limits.
# cLIeNUX has straight nested runlevels, besides 0 1 and 6. Each
# runlevel is a sub-level of all numerically higher runlevels. This is
# as much systematic-ness as I can muster with this mess.


## 22222222222222222222222222222222222222222222222222222
# 2345789     	minimal

kern:12345789:once:/.bi/mount -t proc /proc /.pro
vt1:12345789:respawn:/.sbi/mingetty --user r tty1 
vt2:12345789:respawn:/.sbi/mingetty --user r tty2
date:12345789:once:/.bi/date  > /boot/messages
bmsg:12345789:once:/.sbi/kernelbuffer >> /boot/messages
rmmt:12345789:once:/.bi/rm /configure/mtab
hnm:345789:once:/.bi/hostname cLIeNUX
#### snd:345789:once:/.bi/sound 
keys:345789:once:/.sbi/loadkeys	  /.et/keyboard/defkeymap.map

#### 3333333333333333333333333333333333333333333
## 345789      	consoles


tcol:345:once:/.bi/textcolor -c
##tm90:345789:once:/.bi/SVGATextMode VGA90
vt3:345789:respawn:/.sbi/mingetty --user r tty3 
vt4:345789:respawn:/.sbi/mingetty --user r tty4
vt5:345789:respawn:/.sbi/mingetty --user r tty5
vt6:345789:respawn:/.sbi/mingetty --user r tty6
vt7:345789:respawn:/.sbi/mingetty --user r tty7
vt8:345789:respawn:/.sbi/mingetty --user r tty8
vt9:345789:respawn:/.sbi/mingetty --user  r tty9
vt10:345789:respawn:/.sbi/mingetty --user r tty10
vt11:345789:respawn:/.sbi/mingetty --user r tty11
vt12:345789:respawn:/.sbi/mingetty --user r tty12
#vt13:345789:respawn:/.sbi/mingetty --user r tty13
#vt14:345789:respawn:/.sbi/mingetty --user r tty14
#vt15:345789:respawn:/.sbi/mingetty --user r tty15
#vt16:345789:respawn:/.sbi/mingetty --user r tty16
chvt:5:once:/.sbi/changevt 2


## CLEANUP
font:345789:once:/.sbi/setfont /subroutine/11

## I can't get gpm to run from init. comments welcome.
## uh. never mind. It works on a PS/2. Didn't with -t msc on a klone.

GPM:345789:once:/.sbi/mouse -t ps2


##444444444444444444444444444444444444444
## 45789    	mounts

## not really a mount, but I think rpc.mountd wants it 
127:45789:wait:/.bi/netface lo 127.0.0.1

# bogo:45789:wait:/.sbi/bogocleans  off does this. Do it on shutdown.
ma:45789:wait:/.bi/mount -a
# mtab:12345789:once:/.bi/get /.pro/mounts > /.et/mtab


###555555555555555555555555555555555
## 5789		daemons

sys:5789:once:/.sbi/syslogd

## technically a server, but it's just for EFnet irc #linux
## the -b means without inetd



########## 6 6 6 6 6 6  6 6 6 6 6 6 6 6 6  6 6  6 6
# Runlevel 6 reboots the system.
rebo:6:wait:/.bi/flush
## was :once:
## a second flush goes fast

###777777777777777777777777777777
## 789		networks

## CLEANUP
# eth0:789:wait:/.bi/ifconfig eth0 192.168.0.1
# ert:789:once:/.bi/route add 192.168.0.01
# rout:789:once:/.bi/route add 127.0.0.1
# rte:789:once:/.bi/route add 127.0.0.3


###8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8
## 89		servers


##  ind:89:once:/.sbi/inetd
## idnt:89:wait:/.sbi/in.identd -b -u2



## Copyright 1999 Richard Allen Hohensee 
## This file is released for redistribution only as part of
## an intact entire cLIeNUX Core.

