#!/bin/sh

# Shorter startup sequence

# Standard busybox init
/bin/mount -t proc proc /proc
/bin/mount -o remount,rw,noatime / 
/bin/mount -t sysfs sysfs /sys
/bin/mount -t devtmpfs dev /dev
/bin/hostname -F /etc/hostname

# udev
/sbin/udevd -d
udevadm trigger
udevadm settle --timeout=2

# Seed urandom with something
cat /proc/cpuinfo /sys/class/drm/*/edid > /dev/urandom

# dhcpcd
mkdir -p /var/run
dhcpcd -f /etc/dhcpcd.conf --noarp 2>/dev/null &

if grep -q debugconsole /proc/cmdline; then
	/sbin/getty -L ttyAMA0 0 vt100 &
fi

if grep -q blockingconsole /proc/cmdline; then
    /sbin/getty -L ttyAMA0 0 vt100
fi

/etc/init.d/S99rpi-imager start
