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 | |
| 26 | export TMPDIR=/mnt/.psplash |
Brad Bishop | 96ff198 | 2019-08-19 13:50:42 -0400 | [diff] [blame] | 27 | [ -d $TMPDIR ] || mkdir -p $TMPDIR |
Brad Bishop | 1d80a2e | 2019-11-15 16:35:03 -0500 | [diff] [blame^] | 28 | if ! mountpoint -q $TMPDIR; then |
Brad Bishop | c68388fc | 2019-08-26 01:33:31 -0400 | [diff] [blame] | 29 | mount tmpfs -t tmpfs $TMPDIR -o,size=40k |
| 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 | |