reset 291 B

1234567891011121314151617181920
  1. #!/bin/sh
  2. [ "${ACTION}" = "released" ] || exit 0
  3. . /lib/functions.sh
  4. logger "$BUTTON pressed for $SEEN seconds"
  5. if [ "$SEEN" -lt 1 ]
  6. then
  7. echo "REBOOT" > /dev/console
  8. sync
  9. reboot
  10. elif [ "$SEEN" -gt 5 ]
  11. then
  12. echo "FACTORY RESET" > /dev/console
  13. jffs2reset -y && reboot &
  14. fi
  15. return 0