0003-base-files-disable-reset-button-handling.patch 943 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. From: Matthias Schiffer <mschiffer@universe-factory.net>
  2. Date: Sat, 21 Mar 2015 16:40:52 +0100
  3. Subject: base-files: disable reset button handling
  4. This conflicts with our reset button usage.
  5. diff --git a/package/base-files/files/etc/rc.button/reset b/package/base-files/files/etc/rc.button/reset
  6. deleted file mode 100755
  7. index 4265767437e8eda3c758fe7f7941d7f608c95782..0000000000000000000000000000000000000000
  8. --- a/package/base-files/files/etc/rc.button/reset
  9. +++ /dev/null
  10. @@ -1,31 +0,0 @@
  11. -#!/bin/sh
  12. -
  13. -. /lib/functions.sh
  14. -
  15. -OVERLAY="$( grep ' /overlay ' /proc/mounts )"
  16. -
  17. -case "$ACTION" in
  18. -pressed)
  19. - [ -z "$OVERLAY" ] && return 0
  20. -
  21. - return 5
  22. -;;
  23. -timeout)
  24. - . /etc/diag.sh
  25. - set_state failsafe
  26. -;;
  27. -released)
  28. - if [ "$SEEN" -lt 1 ]
  29. - then
  30. - echo "REBOOT" > /dev/console
  31. - sync
  32. - reboot
  33. - elif [ "$SEEN" -gt 5 -a -n "$OVERLAY" ]
  34. - then
  35. - echo "FACTORY RESET" > /dev/console
  36. - jffs2reset -y && reboot &
  37. - fi
  38. -;;
  39. -esac
  40. -
  41. -return 0