From 530f96ae0cb05676a64da2cb6f6a0341ed550d8a Mon Sep 17 00:00:00 2001 From: Juan RP Date: Sat, 20 Sep 2014 09:41:49 +0200 Subject: services/agetty-*: make these work with busybox getty too. --- services/agetty-console/run | 7 ++++++- services/agetty-generic/run | 9 ++++++++- services/agetty-tty1/run | 10 +++++++++- 3 files changed, 23 insertions(+), 3 deletions(-) (limited to 'services') diff --git a/services/agetty-console/run b/services/agetty-console/run index 5a91e76..9fc6409 100755 --- a/services/agetty-console/run +++ b/services/agetty-console/run @@ -1,2 +1,7 @@ #!/bin/sh -exec agetty console linux +if [ -x /sbin/getty ]; then + GETTY=getty +elif [ -x /sbin/agetty ]; then + GETTY=agetty +fi +exec $GETTY console 38400 linux 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 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 -- cgit 1.4.1