#!/bin/sh

silent()
{
	if test -c /dev/null; then
		"$@" >/dev/null 2>&1
	else
		"$@" 2>&1 | read dummyvar
	fi
}

test -x /sbin/splashy || exit

VESA=false
for x in $(cat /proc/cmdline); do
	case $x in
	vga=*)
		VESA=true
		;;
	esac
done
test $VESA = "true" || exit

silent modprobe fbcon
silent modprobe vesafb

test -c "/dev/fb0" ||
	mknod /dev/fb0 c 29 0
for i in 0 1 2 3 4 5 6 7 8; do
	test -c "/dev/tty$i" ||
		mknod /dev/tty$i c 4 $i
done

# if splashy.fifo is inside /dev/.initramfs splashy_config will complain if
# this directory doesn't exist, so we make sure it's there
test -d "/dev/.initramfs" ||
	mkdir -p /dev/.initramfs

# Now started after init
#/sbin/splashy boot
#sleep 1
