1#!/bin/sh
2### BEGIN INIT INFO
3# Provides:             psplash
4# Required-Start:
5# Required-Stop:
6# Default-Start:        S
7# Default-Stop:
8### END INIT INFO
9
10if [ ! -e /dev/fb0 ]; then
11    echo "Framebuffer /dev/fb0 not detected"
12    echo "Boot splashscreen disabled"
13    exit 0;
14fi
15
16read CMDLINE < /proc/cmdline
17for x in $CMDLINE; do
18        case $x in
19        psplash=false)
20		echo "Boot splashscreen disabled"
21		exit 0;
22                ;;
23        esac
24done
25
26export PSPLASH_FIFO_DIR=/mnt/.psplash
27[ -d $PSPLASH_FIFO_DIR ] || mkdir -p $PSPLASH_FIFO_DIR
28if ! mountpoint -q $PSPLASH_FIFO_DIR; then
29	mount tmpfs -t tmpfs $PSPLASH_FIFO_DIR -o,size=40k
30fi
31
32rotation=0
33if [ -e /etc/rotation ]; then
34	read rotation < /etc/rotation
35fi
36
37/usr/bin/psplash --angle $rotation &
38
39