#!/bin/sh | |
err="" | |
disable="/config/NO_GETTY_$1" | |
if [ ! -e /tmp/DEBUG ]; then | |
err="To activate, boot with debug=1 or login=1." | |
elif [ -e "$disable" ]; then | |
err="To activate, remove $disable." | |
fi | |
if [ -z "$err" ]; then | |
wait-until-created /dev/"$1" | |
agetty -8 -L "$1" 115200 vt100 | |
else | |
echo "Not running getty on '$1'. $err" >&2 | |
while true; do | |
sleep 86400; | |
done | |
fi | |