diff options
Diffstat (limited to 'modules.d/slx-splash/hooks/s3-splash-init.sh')
-rwxr-xr-x | modules.d/slx-splash/hooks/s3-splash-init.sh | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/modules.d/slx-splash/hooks/s3-splash-init.sh b/modules.d/slx-splash/hooks/s3-splash-init.sh new file mode 100755 index 00000000..d64f6396 --- /dev/null +++ b/modules.d/slx-splash/hooks/s3-splash-init.sh @@ -0,0 +1,36 @@ +#!/bin/bash + +grep -qw 'splash' "/proc/cmdline" || exit 0 + +# taken from dracut's plymouth module +# first trigger graphics subsystem +udevadm trigger --action=add --attr-match=class=0x030000 &> /dev/null +# first trigger graphics and tty subsystem +udevadm trigger --action=add \ +--subsystem-match=graphics \ + --subsystem-match=drm \ + --subsystem-match=tty \ + --subsystem-match=acpi \ + &> /dev/null +# Wait for it.... +udevadm settle --timeout=180 2>&1 + +# disable non-critical kernel messages +echo "1 1 0 1" > /proc/sys/kernel/printk +# disable systemd's status message on console +# See: https://www.freedesktop.org/software/systemd/man/systemd.html#Signals +kill -55 1 +# clear console +busybox clear +# disable cursor +echo -e "\033[?25l" > /dev/console +# finally: +if splashtool --center /etc/splash.ppm -b; then + splashtool --reset /opt/openslx/icons +else + # fbsplash failed, most likely due to missing /dev/fb0 + # -> reactivate systemd status messages + kill -54 1 +fi + +exit 0 |