--- elwix/config/etc/default/pceng/button.sh 2011/10/24 20:43:32 1.1 +++ elwix/config/etc/default/pceng/button.sh 2011/11/02 09:51:32 1.2 @@ -0,0 +1,14 @@ +#!/bin/sh +# +# Button event script +# +# $Id: button.sh,v 1.2 2011/11/02 09:51:32 misho Exp $ + +PRESSED=${1:-0} + +logger "Button pressed for $PRESSED seconds" +if [ $PRESSED -gt 3 ]; then + halt -p +else + reboot +fi