# /etc/inittab
#
# 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.
#
# 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
# process   == program to run

# Startup the system
::sysinit:/bin/mount -t proc proc /proc
::sysinit:/bin/mount -o remount,ro,sync /
::sysinit:/bin/mount -t sysfs sysfs /sys
::sysinit:/bin/mkdir -p /dev/pts
::sysinit:/bin/mount -a
::sysinit:/bin/mkdir /var/tmp /var/log /var/run /var/lock /var/etc /var/empty /var/shm
::sysinit:/bin/mkdir /dev/shm
::sysinit:/bin/mount /var/tmp /tmp
::sysinit:/bin/mount /var/run /run
::sysinit:/bin/mount /var/shm /dev/shm
::sysinit:/bin/hostname -F /etc/hostname
#::sysinit:/bin/echo 1 > /sys/class/leds/knx/brightness

# network initialization
::sysinit:/sbin/ifconfig lo 127.0.0.1 up
::sysinit:/sbin/route add -net 127.0.0.0 netmask 255.0.0.0 lo

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

# Put a getty on the serial port
ttymxc4::respawn:/sbin/getty -L ttymxc4 115200 vt100

# Restart script
ttymxc4::restart:/sbin/init.restart

# As the init script stop targets do not stop the processes
# kill them so that we are able to control the LEDs.
::shutdown:/usr/bin/killall -9 mono devicestack knxstack
::shutdown:/etc/init.d/K99ledreset

# save random seed
null::shutdown:/etc/init.d/S20urandom stop
# Gracefully ask udevd to stop
::shutdown:/etc/init.d/S10udev stop

# update hardware clock
null::shutdown:/sbin/hwclock --utc -w

# Logging junk
null::sysinit:/bin/touch /var/log/messages

# Stuff to do before rebooting
null::shutdown:/bin/umount -a -r
null::shutdown:/sbin/swapoff -a
