--- embedtools/etc/button.sh 2011/07/22 14:45:30 1.1 +++ embedtools/etc/button.sh 2012/07/22 22:46:46 1.2 @@ -0,0 +1,14 @@ +#!/bin/sh +# +# Button event script +# +# $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