blob: e0f80bcdc039fa22ac324e06261f18b849de9b28 [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
Andrew Geisslerd1e89492021-02-12 15:35:20 -060010. /etc/default/rcS
11export PSPLASH_FIFO_DIR
12
Brad Bishopd7bf8c12018-02-25 22:55:05 -050013if [ ! -e /dev/fb0 ]; then
14 echo "Framebuffer /dev/fb0 not detected"
15 echo "Boot splashscreen disabled"
16 exit 0;
17fi
18
Patrick Williamsc124f4f2015-09-15 14:41:29 -050019read CMDLINE < /proc/cmdline
20for x in $CMDLINE; do
21 case $x in
22 psplash=false)
23 echo "Boot splashscreen disabled"
24 exit 0;
25 ;;
26 esac
27done
28
Andrew Geissler82c905d2020-04-13 13:39:40 -050029[ -d $PSPLASH_FIFO_DIR ] || mkdir -p $PSPLASH_FIFO_DIR
30if ! mountpoint -q $PSPLASH_FIFO_DIR; then
31 mount tmpfs -t tmpfs $PSPLASH_FIFO_DIR -o,size=40k
Brad Bishopc68388fc2019-08-26 01:33:31 -040032fi
Patrick Williamsc124f4f2015-09-15 14:41:29 -050033
34rotation=0
35if [ -e /etc/rotation ]; then
36 read rotation < /etc/rotation
37fi
38
39/usr/bin/psplash --angle $rotation &
40