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
|
|
|
|
|
|
|
. /lib/functions/leds.sh
|
|
|
|
. /lib/mvebu.sh
|
|
|
|
|
|
|
|
get_status_led() {
|
|
|
|
case $(mvebu_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-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
|
|
|
|
}
|