diag.sh 462 B

1234567891011121314151617181920212223242526272829303132333435
  1. #!/bin/sh
  2. # Copyright (C) 2015-2016 OpenWrt.org
  3. . /lib/functions/leds.sh
  4. . /lib/brcm2708.sh
  5. set_state() {
  6. case "$(brcm2708_board_name)" in
  7. rpi-b |\
  8. rpi-cm |\
  9. rpi-zero)
  10. status_led="led0"
  11. ;;
  12. rpi-b-plus |\
  13. rpi-2-b |\
  14. rpi-3-b)
  15. status_led="led1"
  16. ;;
  17. esac
  18. case "$1" in
  19. preinit)
  20. status_led_blink_preinit
  21. ;;
  22. failsafe)
  23. status_led_blink_failsafe
  24. ;;
  25. preinit_regular)
  26. status_led_blink_preinit_regular
  27. ;;
  28. done)
  29. status_led_on
  30. ;;
  31. esac
  32. }