X-Git-Url: https://spindle.queued.net/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=autox;h=245bc3b4aa534eb9f6f65cc4c633132b1573ffae;hb=0c5a57f891c0736de1394e443c78d1204acdd35e;hp=014bdc20760de9dd5df28d875c8ef6a37e72557b;hpb=02354cca92286267690acda2d1f6d031e45a1e5e;p=autox diff --git a/autox b/autox index 014bdc2..245bc3b 100755 --- a/autox +++ b/autox @@ -3,16 +3,18 @@ TIMEOUT=20 PIDFILE=/var/run/autox.pid -#moo() { +if [ -z "$1" ]; then + echo "Usage: $0 " 1>&2 + exit 1 +fi echo $$ > $PIDFILE trap "rm -f $PIDFILE; killall -9 startx" 0 -#trap "killall startx" 0 fails=0 while true; do start_time=`date "+%s"` - openvt -w -- su -c startx olpc + openvt -w -- su -c startx $1 end_time=`date "+%s"` timediff=$((end_time-start_time)) @@ -27,10 +29,5 @@ while true; do exit 1 fi done -#} - - -#input_dev=$(readlink -f /dev/stdin) -#autox_daemon "$input_device" & exit 0