Return to button.sh CVS log | Up to [ELWIX - Embedded LightWeight unIX -] / embedtools / etc |
1.1.2.1 misho 1: #!/bin/sh 2: # 3: # Button event script 4: # 1.1.2.3 ! misho 5: # $Id: button.sh,v 1.1.2.2 2011/10/24 20:41:43 misho Exp $ 1.1.2.1 misho 6: 7: PRESSED=${1:-0} 8: 1.1.2.2 misho 9: logger "Button pressed for $PRESSED seconds" 1.1.2.3 ! misho 10: if [ $PRESSED -gt 3 ]; then ! 11: halt -p ! 12: else ! 13: reboot ! 14: fi