diag.sh 736 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. #!/bin/sh
  2. # Copyright (C) 2014-2016 OpenWrt.org
  3. # Copyright (C) 2016 LEDE-Project.org
  4. . /lib/functions.sh
  5. . /lib/functions/leds.sh
  6. get_status_led() {
  7. case $(board_name) in
  8. linksys,caiman)
  9. status_led="caiman:white:power"
  10. ;;
  11. linksys,cobra)
  12. status_led="cobra:white:power"
  13. ;;
  14. linksys,mamba)
  15. status_led="mamba:white:power"
  16. ;;
  17. linksys,rango)
  18. status_led="rango:white:power"
  19. ;;
  20. linksys,shelby)
  21. status_led="shelby:white:power"
  22. ;;
  23. linksys,venom)
  24. status_led="venom:blue:power"
  25. ;;
  26. esac
  27. }
  28. set_state() {
  29. get_status_led
  30. case "$1" in
  31. preinit)
  32. status_led_blink_preinit
  33. ;;
  34. failsafe)
  35. status_led_blink_failsafe
  36. ;;
  37. preinit_regular)
  38. status_led_blink_preinit_regular
  39. ;;
  40. done)
  41. status_led_on
  42. ;;
  43. esac
  44. }