blob: fee23e681cfb34bee0684d35f16a6c2536bc5277 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001#!/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
Brad Bishopd7bf8c12018-02-25 22:55:05 -050010if [ ! -e /dev/fb0 ]; then
11 echo "Framebuffer /dev/fb0 not detected"
12 echo "Boot splashscreen disabled"
13 exit 0;
14fi
15
Patrick Williamsc124f4f2015-09-15 14:41:29 -050016read 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 TMPDIR=/mnt/.psplash
Brad Bishop96ff1982019-08-19 13:50:42 -040027[ -d $TMPDIR ] || mkdir -p $TMPDIR
Patrick Williamsc124f4f2015-09-15 14:41:29 -050028mount tmpfs -t tmpfs $TMPDIR -o,size=40k
29
30rotation=0
31if [ -e /etc/rotation ]; then
32 read rotation < /etc/rotation
33fi
34
35/usr/bin/psplash --angle $rotation &
36