blob: f58e043733e3b14f6ccd3d47aa3f2453b423846f [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
Andrew Geissler706d5aa2021-02-12 15:55:30 -060026export PSPLASH_FIFO_DIR=/mnt/.psplash
Andrew Geissler82c905d2020-04-13 13:39:40 -050027[ -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
Brad Bishopc68388fc2019-08-26 01:33:31 -040030fi
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