Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 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 | |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 10 | if [ ! -e /dev/fb0 ]; then |
| 11 | echo "Framebuffer /dev/fb0 not detected" |
| 12 | echo "Boot splashscreen disabled" |
| 13 | exit 0; |
| 14 | fi |
| 15 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 16 | read CMDLINE < /proc/cmdline |
| 17 | for x in $CMDLINE; do |
| 18 | case $x in |
| 19 | psplash=false) |
| 20 | echo "Boot splashscreen disabled" |
| 21 | exit 0; |
| 22 | ;; |
| 23 | esac |
| 24 | done |
| 25 | |
Andrew Geissler | 706d5aa | 2021-02-12 15:55:30 -0600 | [diff] [blame^] | 26 | export PSPLASH_FIFO_DIR=/mnt/.psplash |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 27 | [ -d $PSPLASH_FIFO_DIR ] || mkdir -p $PSPLASH_FIFO_DIR |
| 28 | if ! mountpoint -q $PSPLASH_FIFO_DIR; then |
| 29 | mount tmpfs -t tmpfs $PSPLASH_FIFO_DIR -o,size=40k |
Brad Bishop | c68388fc | 2019-08-26 01:33:31 -0400 | [diff] [blame] | 30 | fi |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 31 | |
| 32 | rotation=0 |
| 33 | if [ -e /etc/rotation ]; then |
| 34 | read rotation < /etc/rotation |
| 35 | fi |
| 36 | |
| 37 | /usr/bin/psplash --angle $rotation & |
| 38 | |