# inittab       This file describes how the INIT process should set up
#               the system in a certain run-level.
#
# Author:       Antonio GALLO <agx@usa.net>
#               Runlevel are similar to Red-Hat

# Default runlevel. The runlevels used by RHS are:
#   0 - halt (Do NOT set initdefault to this)
#   1 - Single user mode
#   2 - Multiuser, without NFS (The same as 3, if you do not have networking)
#   3 - Full multiuser mode    (This is the default)
#   4 - X11
#   5 - Custom Mode (Single User with all the VCS )
#   6 - reboot (Do NOT set initdefault to this)

# Default Runlevel
id:3:initdefault:

# System initialization.
si:S:sysinit:/etc/init.d/rc S

# Run Levels
l0:0:wait:/etc/init.d/rc 0
l1:1:wait:/etc/init.d/rc 1
l2:2:wait:/etc/init.d/rc 2
l3:3:wait:/etc/init.d/rc 3
l4:4:wait:/etc/init.d/rc 4
l5:5:wait:/etc/init.d/rc 5
l6:6:wait:/etc/init.d/rc 6

# Trap CTRL-ALT-DELETE
ca:12345:ctrlaltdel:/sbin/shutdown -t1 -r now

# When our UPS tells us power has failed, assume we have a few minutes
# of power left.  Schedule a shutdown for 2 minutes from now.
# This does, of course, assume you have powerd installed and your
# UPS connected and working correctly.
# pf::powerfail:/sbin/shutdown -f -h +4 "Power Failure; System Shutting Down"
pf::powerwait:/etc/init.d/powerfail.rc start

# If power was restored before the shutdown kicked in, cancel it.
# pr:12345:powerokwait:/sbin/shutdown -c "Power Restored; Shutdown Cancelled"
po::powerokwait:/etc/init.d/powerfail.rc stop

# If power comes back in single user mode, return to multi user mode.
# ps:S:powerokwait:/sbin/init 3
pn::powerfailnow:/etc/init.d/powerfail.rc now


# Special action
kb::kbrequest:/bin/echo "Keyboard Request ..."

# Run gettys in standard runlevels
1:1235:respawn:/sbin/mingetty tty1
2:235:respawn:/sbin/mingetty tty2
3:235:respawn:/sbin/mingetty tty3
4:235:respawn:/sbin/mingetty tty4
5:235:respawn:/sbin/mingetty tty5
6:2345:respawn:/sbin/mingetty tty6

# Normally not reached, but fallthrough in case of emergency.
z6:6:respawn:/sbin/sulogin

# --------------------------------------------------------------------

# Configure Modem on COM1 
# S0:2345:respawn:/sbin/uugetty -d /etc/conf.uugetty cua0 F115200 vt100

# Serial lines
#s1:12345:respawn:/sbin/agetty 19200 ttyS0 vt100
#s2:12345:respawn:/sbin/agetty 19200 ttyS1 vt100

# Dialup lines
#d1:12345:respawn:/sbin/agetty -mt60 38400,19200,9600,2400,1200 ttyS0 vt100
#d2:12345:respawn:/sbin/agetty -mt60 38400,19200,9600,2400,1200 ttyS1 vt100

# Example how to put a getty on a serial line (for a terminal)
#T0:23:respawn:/sbin/getty -L ttyS0 9600 vt100
#T1:23:respawn:/sbin/getty -L ttyS1 9600 vt100

# Example how to put a getty on a modem line.
#T3:23:respawn:/sbin/mgetty -x0 -s 57600 ttyS3
