summaryrefslogtreecommitdiffstats
path: root/modules.d/slx-splash/scripts/restore-cursor.sh
blob: 4ba9880d38622f15adc8838470001885ef5aa190 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
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