#!/bin/sh
export PATH=/bin:/sbin:/usr/bin:/usr/sbin

mount -n -t proc proc /proc
mount -n -t sysfs sysfs /sys
mount -o remount,rw /

if [ -e /usr/bin/psplash ]; then
	psplash 2>/dev/null &
fi

COUNT=$(ls /etc/init.d/S* | wc -l)
C=1
for s in /etc/init.d/S*; do
	if [ -x $s ]; then
		$s start
	if [ -e /tmp/psplash_fifo ]; then
		PERCENT=$((100/$COUNT * $C))
		psplash-write "PROGRESS $PERCENT" 2>/dev/null
	fi
	fi
	C=$(($C+1))
done

if [ -x /etc/init.d/rc.local ]; then
	/etc/init.d/rc.local start
fi

