2014-06-29 12:53:09 +00:00
|
|
|
#!/bin/sh
|
2016-10-14 11:50:41 +00:00
|
|
|
# Copyright (C) 2014-2016 OpenWrt.org
|
|
|
|
# Copyright (C) 2016 LEDE-Project.org
|
2014-06-29 12:53:09 +00:00
|
|
|
|
2017-05-12 20:36:07 +00:00
|
|
|
. /lib/functions.sh
|
2014-06-29 12:53:09 +00:00
|
|
|
. /lib/functions/leds.sh
|
|
|
|
|
|
|
|
get_status_led() {
|
2017-05-12 20:36:07 +00:00
|
|
|
case $(board_name) in
|
2016-10-14 11:50:41 +00:00
|
|
|
armada-385-linksys-caiman)
|
|
|
|
status_led="caiman:white:power"
|
|
|
|
;;
|
|
|
|
armada-385-linksys-cobra)
|
|
|
|
status_led="cobra:white:power"
|
|
|
|
;;
|
2016-10-13 10:52:20 +00:00
|
|
|
armada-385-linksys-rango)
|
|
|
|
status_led="rango:white:power"
|
|
|
|
;;
|
2016-06-15 10:42:14 +00:00
|
|
|
armada-385-linksys-shelby)
|
|
|
|
status_led="shelby:white:power"
|
|
|
|
;;
|
2015-04-12 17:29:50 +00:00
|
|
|
armada-xp-linksys-mamba)
|
2014-06-29 12:53:09 +00:00
|
|
|
status_led="mamba:white:power"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
}
|
|
|
|
|
|
|
|
set_state() {
|
|
|
|
get_status_led
|
|
|
|
|
|
|
|
case "$1" in
|
|
|
|
preinit)
|
|
|
|
status_led_blink_preinit
|
|
|
|
;;
|
|
|
|
failsafe)
|
|
|
|
status_led_blink_failsafe
|
|
|
|
;;
|
2014-12-15 10:37:00 +00:00
|
|
|
preinit_regular)
|
|
|
|
status_led_blink_preinit_regular
|
|
|
|
;;
|
2014-06-29 12:53:09 +00:00
|
|
|
done)
|
|
|
|
status_led_on
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
}
|