2011-11-12 23:39:56 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
[ "${ACTION}" = "released" ] || exit 0
|
|
|
|
|
|
|
|
. /lib/functions.sh
|
|
|
|
|
|
|
|
case "${BUTTON}" in
|
2012-12-19 15:17:42 +00:00
|
|
|
reset)
|
2011-11-12 23:39:56 +00:00
|
|
|
logger "reset pressed"
|
2012-12-15 02:01:00 +00:00
|
|
|
echo "REBOOT" > /dev/console
|
|
|
|
sleep 3
|
2011-11-12 23:39:56 +00:00
|
|
|
sync
|
|
|
|
reboot
|
|
|
|
;;
|
|
|
|
BTN_1)
|
|
|
|
logger "factory pressed"
|
2012-12-15 02:01:00 +00:00
|
|
|
echo "FACTORY RESET" > /dev/console
|
2011-11-12 23:39:56 +00:00
|
|
|
jffs2_mark_erase "rootfs_data"
|
|
|
|
sync
|
|
|
|
reboot
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
logger "unknown button ${BUTTON}"
|
|
|
|
;;
|
|
|
|
esac
|