diff options
Diffstat (limited to 'modules.d/slx-splash/hooks/s3-splash-stage4.sh')
-rwxr-xr-x | modules.d/slx-splash/hooks/s3-splash-stage4.sh | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/modules.d/slx-splash/hooks/s3-splash-stage4.sh b/modules.d/slx-splash/hooks/s3-splash-stage4.sh new file mode 100755 index 00000000..b88a6a90 --- /dev/null +++ b/modules.d/slx-splash/hooks/s3-splash-stage4.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +grep -qw 'splash' "/proc/cmdline" || return 0 + +# Set option that we want splash + +echo "SLX_SPLASH='yes'" >> "$NEWROOT/opt/openslx/config" + +# The console cursor is disabled when starting the splash screen. +# This will add a drop-in to getty@.service to ensure the cursor +# is restored when starting gettys. + +mkdir -p "$NEWROOT/etc/systemd/system/getty@.service.d/" +cat <<- EOF > "$NEWROOT/etc/systemd/system/getty@.service.d/restore-cursor.conf" + [Service] + ExecStartPre=-/usr/bin/env bash -c "echo -en '\033c' > /dev/%I" +EOF + +# Copy icons and tools, so we can trigger the HDD icon in +# setup-partitions.service + +cp -n "$( which splashtool )" "$NEWROOT/opt/openslx/bin/splashtool" +cp -n -r "/opt/openslx/icons" -t "$NEWROOT/opt/openslx/" + +: |