#!/bin/sh
+killproc() { # kill the named process(es)
+ pid=`/bin/pidof $1`
+ [ "$pid" != "" ] && kill $pid
+}
+
if grep -qE '\s?psplash=false\s?' /proc/cmdline; then
echo "Boot splashscreen disabled"
exit 0;
. /etc/init.d/functions
. /etc/default/dotsplash
-export TMPDIR=/mnt/.splash
-mount tmpfs -t tmpfs $TMPDIR -o,size=40k
+export TMPDIR=/mnt/.psplash
+
+case "$1" in
+ start)
+ mount tmpfs -t tmpfs $TMPDIR -o,size=40k
+ /usr/bin/dotsplash $PARAMS &
-/usr/bin/dotsplash $PARAMS &
+ # Timetrap against hanging with splash hiding console messages.
+ (sleep 60; dotsplash-write "QUIT"; sleep 1 ; killall dotsplash) &
+ ;;
+
+ stop)
+ killproc dotsplash
+ umount $TMPDIR
+ ;;
-# Timetrap against hanging with splash hiding console messages.
-(sleep 120; dotsplash-write "QUIT") &
+ restart)
+ $0 stop
+ $0 start
+ ;;
+
+esac
\ No newline at end of file