--- embedtools/etc/button.sh 2011/07/22 14:45:30 1.1.2.1 +++ embedtools/etc/button.sh 2012/07/22 22:46:46 1.2 @@ -2,8 +2,13 @@ # # Button event script # -# $Id: button.sh,v 1.1.2.1 2011/07/22 14:45:30 misho Exp $ +# $Id: button.sh,v 1.2 2012/07/22 22:46:46 misho Exp $ PRESSED=${1:-0} -echo "Button pressed for $PRESSED seconds" +logger "Button pressed for $PRESSED seconds" +if [ $PRESSED -gt 3 ]; then + halt -p +else + reboot +fi