# This file was deployed via grml-live's
# ${GRML_FAI_CONFIG}/config/scripts/GRMLBASE/15-initsetup script, using
# ${GRML_FAI_CONFIG}/config/files/etc/inittab/GRML_SMALL
################################################################################
# Filename:      inittab.small
# Purpose:       init(8) configuration for grml-small
# Authors:       grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
# Bug-Reports:   see http://grml.org/bugs/
# License:       This file is licensed under the GPL v2.
################################################################################

# The default runlevel.
id:2:initdefault:

# Boot-time system configuration/initialization script.
# This is run first except when booting in emergency (-b) mode.
si::sysinit:/etc/init.d/rcS

# What to do in single-user mode.
~~:S:respawn:/bin/zsh --login >/dev/tty1 2>&1 </dev/tty1

# /etc/init.d executes the S and K scripts upon change
# of runlevel.
#
# Runlevel 0 is halt.
# Runlevel 1 is single-user.
# Runlevels 2-5 are multi-user.
# Runlevel 6 is reboot.

l0:0:wait:/etc/init.d/grml-halt
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/grml-reboot

# What to do when CTRL-ALT-DEL is pressed.
ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now

# Action on special keypress (ALT-UpArrow).
kb::kbrequest:/bin/echo "Keyboard Request -- edit /etc/inittab to let this work."

# What to do when the power fails/returns.
pf::powerwait:/etc/init.d/powerfail start
pn::powerfailnow:/etc/init.d/powerfail now
po::powerokwait:/etc/init.d/powerfail stop

# /sbin/getty invocations for the runlevels.
#
# The "id" field MUST be the same as the last
# characters of the device (after "tty").
#
# Format:
#  <id>:<runlevels>:<action>:<process>
# 4 virtual consoles with immortal shells
# Note that on most Debian systems tty7 is used by the X Window System.
# Use tty8 a second xserver.
1:12345:respawn:/sbin/grml-runtty /dev/tty1 /usr/share/grml-scripts/run-welcome root
2:2345:respawn:/sbin/grml-runtty /dev/tty2 /usr/share/grml-scripts/run-screen root
3:2345:respawn:/sbin/grml-runtty /dev/tty3 /usr/share/grml-scripts/run-screen root
#4:2345:respawn:/sbin/grml-runtty /dev/tty4 /usr/share/grml-scripts/run-screen $USERNAME
#5:2345:respawn:/sbin/grml-runtty /dev/tty5 /bin/zsh $USERNAME
#6:2345:respawn:/sbin/grml-runtty /dev/tty6 /bin/zsh $USERNAME
#9:2345:respawn:/sbin/getty  38400 tty9
#10:2345:respawn:/sbin/grml-runtty /dev/tty10 /usr/sbin/grml-iptstate root
#11:2345:respawn:/sbin/grml-runtty /dev/tty11 /usr/bin/htop root
#12:2345:respawn:/sbin/grml-runtty /dev/tty12 /usr/share/grml-scripts/run-multitail root

################################################################################
# Please do NOT remove the line with the marker as it is important for the
# bootoption serial/console. line(s) will be inserted here according to the
# provided kernel command line:
#grmlserial# is a marker, important for the bootoption serial/console
################################################################################

# 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

#-- isdnutils begin
# Change the lines below for your local setup and uncomment them.
# Use "init q" to reread inittab.
# look at the vboxgetty / mgetty manpage for more information (mgetty isn't
# standard!)
#
#I0:2345:respawn:/usr/sbin/vboxgetty -d /dev/ttyI0
#I1:2345:respawn:/sbin/mgetty -D -m '"" ATZ OK AT&Eyourmsnhere OK AT&B512 OK' -s 38400 ttyI1
#-- isdnutils end

# Run X Window session from CDROM in runlevel 5
#w5:5:wait:/bin/sleep 2
#x5:5:wait:/etc/init.d/xsession start

# Use line below to use secvpnmon. Use init q to reread inittab.
# SVPN:2345:respawn:/usr/sbin/secvpnmon
