summary refs log tree commit diff
path: root/vm/sys/net/etc/s6-linux-init/run-image/service/getty-hvc0/run
diff options
context:
space:
mode:
Diffstat (limited to 'vm/sys/net/etc/s6-linux-init/run-image/service/getty-hvc0/run')
-rwxr-xr-xvm/sys/net/etc/s6-linux-init/run-image/service/getty-hvc0/run25
1 files changed, 25 insertions, 0 deletions
diff --git a/vm/sys/net/etc/s6-linux-init/run-image/service/getty-hvc0/run b/vm/sys/net/etc/s6-linux-init/run-image/service/getty-hvc0/run
new file mode 100755
index 0000000..2d2022c
--- /dev/null
+++ b/vm/sys/net/etc/s6-linux-init/run-image/service/getty-hvc0/run
@@ -0,0 +1,25 @@
+#!/bin/execlineb -P
+# SPDX-License-Identifier: EUPL-1.2
+# SPDX-FileCopyrightText: 2021 Alyssa Ross <hi@alyssa.is>
+
+export TERM foot
+export TERMINFO_DIRS /usr/share/terminfo
+
+backtick USER { id -un }
+backtick HOME {
+  importas -i user USER
+  homeof $user
+}
+
+importas -i home HOME
+cd $home
+
+redirfd -u 0 /dev/hvc0
+fdmove -c 1 0
+fdmove -c 2 0
+
+foreground { clear }
+unexport ?
+
+exec -l
+sh