# /etc/inittab
# PiBox V0.1 init
#
# Copyright (C) 2001 Erik Andersen <andersen@codepoet.org>
#
# Note: BusyBox init doesn't support runlevels.  The runlevels field is
# completely ignored by BusyBox init. If you want runlevels, use
# sysvinit.
#
# Good document on Busybox init:
# http://spblinux.de/2.0/doc/init.html
#
# Format for each entry: <id>:<runlevels>:<action>:<process>
#
# id        == tty to run on, or empty for /dev/console
# runlevels == ignored
# action    == one of sysinit, respawn, askfirst, wait, and once
#              sysinit: run at boot, init waits till process completes
#              wait: run once after sysinit processes, init waits till process completes
#              respawn: start asyncronously, restart if process exits
#              askfirst: start asyncronously, prompt if process should be run
#              once: start asyncronously, run once but don't wait till process completes
#              ctrlaltdel: run immediately before init starts reboot
#              Actions are taken in reverse order as they are listed here.
# process   == program to run

# Startup the system
::sysinit:/bin/mount -t proc proc /proc
::sysinit:/bin/mount -t sysfs sysfs /sys
::sysinit:/bin/mount -t usbfs none /proc/bus/usb
::sysinit:/bin/mount -o remount,rw / # REMOUNT_ROOTFS_RW

# now run any rc scripts
::sysinit:/etc/init.d/rcS

::sysinit:/bin/mount -a
::sysinit:/bin/hostname -F /etc/hostname

# Put a getty on the serial port
# ttyO2::respawn:/sbin/getty -L ttyO2 115200 vt100 # Serial console
tty0::respawn:/sbin/getty -L tty0 38400 vt100 # DVI-D console

# Start up X environment
# null::respawn:/usr/bin/xinit /etc/X11/xinitrc

# Stuff to do for the 3-finger salute
::ctrlaltdel:/sbin/reboot

# Stuff to do before rebooting
::shutdown:/etc/init.d/rcK
::shutdown:/bin/umount -a -r
::shutdown:/sbin/swapoff -a

