blob: 4bee866b0dd4449777976cc6fce98cdab2c97d17 [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
Brad Bishop1d80a2e2019-11-15 16:35:03 -050028if ! mountpoint -q $TMPDIR; then
Brad Bishopc68388fc2019-08-26 01:33:31 -040029 mount tmpfs -t tmpfs $TMPDIR -o,size=40k
30fi
Patrick Williamsc124f4f2015-09-15 14:41:29 -050031
32rotation=0
33if [ -e /etc/rotation ]; then
34 read rotation < /etc/rotation
35fi
36
37/usr/bin/psplash --angle $rotation &
38