summary refs log tree commit diff
path: root/services/agetty-tty1/run
diff options
context:
space:
mode:
Diffstat (limited to 'services/agetty-tty1/run')
-rwxr-xr-xservices/agetty-tty1/run10
1 files changed, 9 insertions, 1 deletions
diff --git a/services/agetty-tty1/run b/services/agetty-tty1/run
index 5c4dab1..dc01b10 100755
--- a/services/agetty-tty1/run
+++ b/services/agetty-tty1/run
@@ -1,3 +1,11 @@
 #!/bin/sh
 tty=${PWD##*-}
-exec setsid agetty $([ $tty = tty1 ] && echo --noclear) $tty linux
+if [ -x /sbin/getty ]; then
+	# busybox
+	GETTY=getty
+elif [ -x /sbin/agetty ]; then
+	# util-linux
+	GETTY=agetty
+	GETTY_ARGS="--noclear"
+fi
+exec setsid $GETTY $GETTY_ARGS $tty 38400 linux