]> git.kernelconcepts.de Git - meta-kc-bsp.git/blob - recipes-bsp/dotsplash/files/dotsplash-init
dotsplash: Improve start script and psplash compatibility
[meta-kc-bsp.git] / recipes-bsp / dotsplash / files / dotsplash-init
1 #!/bin/sh 
2
3 killproc() {            # kill the named process(es)
4         pid=`/bin/pidof $1`
5         [ "$pid" != "" ] && kill $pid
6 }
7
8 if grep -qE '\s?psplash=false\s?' /proc/cmdline; then
9         echo "Boot splashscreen disabled"
10         exit 0;
11 fi
12
13 . /etc/init.d/functions
14 . /etc/default/dotsplash
15
16 export TMPDIR=/mnt/.psplash
17
18 case "$1" in
19   start)
20         mount tmpfs -t tmpfs $TMPDIR -o,size=40k
21         /usr/bin/dotsplash $PARAMS &
22
23         # Timetrap against hanging with splash hiding console messages.
24         (sleep 60; dotsplash-write "QUIT"; sleep 1 ; killall dotsplash) &
25   ;;
26   
27   stop)
28         killproc dotsplash
29         umount $TMPDIR
30   ;;
31
32   restart)
33         $0 stop
34         $0 start
35   ;;
36   
37 esac