reset 281 B

123456789101112131415161718
  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