diag.sh 427 B

12345678910111213141516171819202122232425262728293031323334
  1. #!/bin/sh
  2. . /lib/functions/leds.sh
  3. . /lib/ipq806x.sh
  4. get_status_led() {
  5. case $(ipq806x_board_name) in
  6. c2600)
  7. status_led="status:blue"
  8. ;;
  9. ea8500)
  10. status_led="ea8500:white:power"
  11. ;;
  12. esac
  13. }
  14. set_state() {
  15. get_status_led
  16. case "$1" in
  17. preinit)
  18. status_led_blink_preinit
  19. ;;
  20. failsafe)
  21. status_led_blink_failsafe
  22. ;;
  23. preinit_regular)
  24. status_led_blink_preinit_regular
  25. ;;
  26. done)
  27. status_led_on
  28. ;;
  29. esac
  30. }