diff --git a/usr/lib/initcpio/install/archboot_remote b/usr/lib/initcpio/install/archboot_remote index 4a7f3c0e5..d4acad2b8 100644 --- a/usr/lib/initcpio/install/archboot_remote +++ b/usr/lib/initcpio/install/archboot_remote @@ -33,6 +33,7 @@ build () add_symlink /etc/systemd/system/multi-user.target.wants/sshd.service /usr/lib/systemd/system/sshd.service # start ttyd on startup add_file /usr/lib/libwebsockets-evlib_uv.so + add_file /usr/share/archboot/remote/usr/bin/ttyd.sh /usr/bin/ttyd.sh add_file /usr/share/archboot/remote/etc/systemd/system/ttyd.service /etc/systemd/system/ttyd.service add_symlink /etc/systemd/system/multi-user.target.wants/ttyd.service /etc/systemd/system/ttyd.service # fix licenses diff --git a/usr/share/archboot/remote/etc/systemd/system/ttyd.service b/usr/share/archboot/remote/etc/systemd/system/ttyd.service index a96755b1c..28da56dc9 100644 --- a/usr/share/archboot/remote/etc/systemd/system/ttyd.service +++ b/usr/share/archboot/remote/etc/systemd/system/ttyd.service @@ -7,7 +7,7 @@ After=syslog.target After=network.target [Service] -ExecStart=/usr/bin/ttyd bash +ExecStart=/usr/bin/ttyd ttyd.sh Type=simple Restart=always User=root diff --git a/usr/share/archboot/remote/usr/bin/ttyd.sh b/usr/share/archboot/remote/usr/bin/ttyd.sh new file mode 100755 index 000000000..13ea68ebd --- /dev/null +++ b/usr/share/archboot/remote/usr/bin/ttyd.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash +# SPDX-License-Identifier: GPL-2.0-only +# Created by Tobias Powalowski + +# simulate login from tty +if ! [[ /tmp/.ttyd ]]; then + cat /etc/motd + echo -e "Hit \e[1m\e[92mENTER\e[m for \e[1mshell\e[m login." + read + : >/tmp.ttyd +fi +screen -q -R