01_leds 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. #!/bin/sh
  2. #
  3. # Copyright (C) 2012-2015 OpenWrt.org
  4. #
  5. . /lib/functions/uci-defaults.sh
  6. . /lib/kirkwood.sh
  7. board_config_update
  8. board=$(kirkwood_board_name)
  9. case "$board" in
  10. "dockstar")
  11. ucidef_set_led_default "health" "health" "status:green:health" "1"
  12. ucidef_set_led_default "fault" "fault" "status:orange:fault" "1"
  13. ;;
  14. "linksys-audi")
  15. ucidef_set_led_default "power" "power" "audi:green:power" "1"
  16. ;;
  17. "linksys-viper")
  18. ucidef_set_led_default "health" "health" "viper:white:health" "1"
  19. ucidef_set_led_default "pulse" "pulse" "viper:white:pulse" "1"
  20. ;;
  21. "goflexhome" | \
  22. "goflexnet")
  23. ucidef_set_led_default "health" "health" "status:green:health" "1"
  24. ucidef_set_led_default "fault" "fault" "status:orange:fault" "0"
  25. ;;
  26. "ib62x0")
  27. ucidef_set_led_default "health" "health" "ib62x0:green:os" "1"
  28. ucidef_set_led_default "fault" "fault" "ib62x0:red:os" "1"
  29. ;;
  30. "pogo_e02")
  31. ucidef_set_led_default "health" "health" "pogo_e02:green:health" "1"
  32. ucidef_set_led_default "fault" "fault" "pogo_e02:orange:fault" "1"
  33. ;;
  34. "guruplug-server-plus")
  35. ucidef_set_led_timer "health" "health" "guruplug:red:health" "200" "800"
  36. ;;
  37. "sheevaplug" | \
  38. "sheevaplug-esata")
  39. ucidef_set_led_timer "health" "health" "sheevaplug:blue:health" "200" "800"
  40. ;;
  41. *)
  42. ;;
  43. esac
  44. board_config_flush
  45. exit 0