--- embedtools/etc/button.sh 2011/10/24 20:41:43 1.1.2.2 +++ 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.2 2011/10/24 20:41:43 misho Exp $ +# $Id: button.sh,v 1.2 2012/07/22 22:46:46 misho Exp $ PRESSED=${1:-0} logger "Button pressed for $PRESSED seconds" +if [ $PRESSED -gt 3 ]; then + halt -p +else + reboot +fi