From 14fab902dc46a6d514d766acb5d38b876defcbfb Mon Sep 17 00:00:00 2001 From: Jonathan Bauer Date: Mon, 12 Nov 2018 12:25:31 +0100 Subject: [slx-splash] restore cursor after splashscreen --- builder/modules.d/slx-splash/module-setup.sh | 1 + builder/modules.d/slx-splash/scripts/restore-cursor.sh | 11 +++++++++++ 2 files changed, 12 insertions(+) create mode 100644 builder/modules.d/slx-splash/scripts/restore-cursor.sh diff --git a/builder/modules.d/slx-splash/module-setup.sh b/builder/modules.d/slx-splash/module-setup.sh index 6abd06e0..05542269 100755 --- a/builder/modules.d/slx-splash/module-setup.sh +++ b/builder/modules.d/slx-splash/module-setup.sh @@ -10,4 +10,5 @@ depends() { install() { cp "$moddir/data/splash.ppm.gz" "$initdir/etc/splash.ppm.gz" inst_hook pre-trigger 10 "$moddir/scripts/slx-splash.sh" + inst_hook pre-pivot 20 "$moddir/scripts/restore-cursor.sh" } diff --git a/builder/modules.d/slx-splash/scripts/restore-cursor.sh b/builder/modules.d/slx-splash/scripts/restore-cursor.sh new file mode 100644 index 00000000..4ba9880d --- /dev/null +++ b/builder/modules.d/slx-splash/scripts/restore-cursor.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash +# +# 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 -- cgit v1.2.3-55-g7522