Hello there,
I am using Console version of debian provided on elinux.org on BeagleBone
Black. My problem is that it misses the power button functionality. I have
found this script for handling it:
#!/bin/sh
BTN=/dev/input/event0
while true; do
BTNVAL=`hexdump -e '8/2 "%x " "\n"' -n 16 $BTN | grep ' 74 ' | awk
'{print $7$
if [ "$BTNVAL" = "1" ]
then
echo "Power button pressed"
/sbin/sync
/sbin/sync
/sbin/shutdown -h now
exit
fi
sleep 1
done
I have put a link to it into init.d and used update-rc to make it work at
startup.
The problem is that it doesnt always work. Im not sure either it is running
in the background or not, because when i use ps command i dont see the
script running and even though the power button works. So lets say every
3rd power up the power button doesnt work... Im not sure whats the case. I
would also aprichiate if someone told me either this is the proper way of
handling the power button in the official bigger image.
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.