#!/bin/sh

for x in $(cat /proc/cmdline); do
        case $x in
        splash*)
                SPLASH=true;
                ;;
        esac
done

[ "$SPLASH" != "true" ] && exit 1

# Clean up the console before we switch to it, to avoid text flicker:
if [ -x /usr/bin/tput ]; then
	tput -Tlinux reset > /dev/tty8
fi

# Run usplash, switching to vt8
/sbin/usplash -c &

# Sleep hack to wait for us to be ready, only needed until usplash/bogl
# can be properly daemonised:
sleep 1

# Another hack, this time because "seding TERM signal" seems to take
# forever on some machines (mine included) currently:
usplash_write "TIMEOUT 0"

# Just because, tidyness is next to... Something or other:
exit 0
