diff options
author | Jonathan Bauer | 2021-05-06 14:18:49 +0200 |
---|---|---|
committer | Jonathan Bauer | 2021-05-06 14:18:49 +0200 |
commit | 10a72980c740c6d9f46fbf766ce9ef494105ff94 (patch) | |
tree | de06aa416070ca8f24c0d1912d72aa6cfa1f9291 /modules.d/slx-splash/scripts/slx-splash-init.sh | |
parent | [slx-ssl] suppress output of rmdir (diff) | |
download | systemd-init-10a72980c740c6d9f46fbf766ce9ef494105ff94.tar.gz systemd-init-10a72980c740c6d9f46fbf766ce9ef494105ff94.tar.xz systemd-init-10a72980c740c6d9f46fbf766ce9ef494105ff94.zip |
[slx-splash] initial support for splashtool
Diffstat (limited to 'modules.d/slx-splash/scripts/slx-splash-init.sh')
-rw-r--r-- | modules.d/slx-splash/scripts/slx-splash-init.sh | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/modules.d/slx-splash/scripts/slx-splash-init.sh b/modules.d/slx-splash/scripts/slx-splash-init.sh new file mode 100644 index 00000000..a7f27331 --- /dev/null +++ b/modules.d/slx-splash/scripts/slx-splash-init.sh @@ -0,0 +1,42 @@ +#!/usr/bin/env bash + +type warn &>/dev/null || source /lib/dracut-lib.sh + +init_drm() { + # taken from dracut's plymouth module + # first trigger graphics subsystem + udevadm trigger --action=add --attr-match=class=0x030000 >/dev/null 2>&1 + # first trigger graphics and tty subsystem + udevadm trigger --action=add \ + --subsystem-match=graphics \ + --subsystem-match=drm \ + --subsystem-match=tty \ + --subsystem-match=acpi \ + >/dev/null 2>&1 + + udevadm settle --timeout=180 2>&1 +} + +if grep -wqE 'splash' /proc/cmdline; then + # first init graphics + init_drm + # 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 /opt/openslx/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 +fi + +true |