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
|
2019-05-11 17:37:34 +00:00
|
|
|
linksys,caiman)
|
2016-10-14 11:50:41 +00:00
|
|
|
status_led="caiman:white:power"
|
|
|
|
;;
|
2019-05-11 17:37:34 +00:00
|
|
|
linksys,cobra)
|
2016-10-14 11:50:41 +00:00
|
|
|
status_led="cobra:white:power"
|
|
|
|
;;
|
2019-05-11 17:37:34 +00:00
|
|
|
linksys,mamba)
|
|
|
|
status_led="mamba:white:power"
|
|
|
|
;;
|
|
|
|
linksys,rango)
|
2016-10-13 10:52:20 +00:00
|
|
|
status_led="rango:white:power"
|
|
|
|
;;
|
2019-05-11 17:37:34 +00:00
|
|
|
linksys,shelby)
|
2016-06-15 10:42:14 +00:00
|
|
|
status_led="shelby:white:power"
|
|
|
|
;;
|
2019-05-11 17:37:34 +00:00
|
|
|
linksys,venom)
|
2018-05-13 13:29:30 +00:00
|
|
|
status_led="venom:blue:power"
|
|
|
|
;;
|
2014-06-29 12:53:09 +00:00
|
|
|
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
|
|
|
|
}
|