#!/bin/sh
#
# This scripts makes sure the system is ready to start libsplashy (which
# could be linked in uswsusp or splashy).

PREREQ=""
prereqs()
{
	echo "$PREREQ"
}
case $1 in
# get pre-requisites
prereqs)
	prereqs
	exit 0
	;;
esac

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

depmod -a
silent modprobe fbcon
silent modprobe vesafb

if [ -e /proc/fb ]; then
        while read fbno desc; do
                test -c /dev/fb${fbno} || \
                  mknod /dev/fb${fbno} c 29 ${fbno}
        done < /proc/fb
else
        test -c /dev/fb0 || mknod /dev/fb0 c 29 0
fi

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
