summary refs log tree commit diff
path: root/services/agetty-generic
diff options
context:
space:
mode:
authorJuan RP <xtraeme@gmail.com>2014-09-20 09:41:49 +0200
committerJuan RP <xtraeme@gmail.com>2014-09-20 09:41:49 +0200
commit530f96ae0cb05676a64da2cb6f6a0341ed550d8a (patch)
tree50b8afc94f30332e618acf9963974e8c6345cd55 /services/agetty-generic
parent80419bfd67563e92185a1a1636f99bf14f50db19 (diff)
downloadrunit-void-530f96ae0cb05676a64da2cb6f6a0341ed550d8a.tar.gz
runit-void-530f96ae0cb05676a64da2cb6f6a0341ed550d8a.tar.xz
runit-void-530f96ae0cb05676a64da2cb6f6a0341ed550d8a.zip
services/agetty-*: make these work with busybox getty too.
Diffstat (limited to 'services/agetty-generic')
-rwxr-xr-xservices/agetty-generic/run9
1 files changed, 8 insertions, 1 deletions
diff --git a/services/agetty-generic/run b/services/agetty-generic/run
index 98cc190..9a34297 100755
--- a/services/agetty-generic/run
+++ b/services/agetty-generic/run
@@ -1,3 +1,10 @@
 #!/bin/sh
 tty=${PWD##*-}
-exec setsid agetty $tty linux
+if [ -x /sbin/getty ]; then
+	# busybox
+	GETTY=getty
+elif [ -x /sbin/agetty ]; then
+	# util-linux
+	GETTY=agetty
+fi
+exec setsid $GETTY $tty 38400 linux