openwrtv3/target/linux/ath79/base-files/etc/diag.sh
Johann Neuhauser a7e1e919af ath79: preliminary support for TP-Link WDR3600 / WDR4300 (AR9344)
working:
 - leds
 - buttons
 - lan / wan
 - usb (hub port 1 + 2)
 - wifi 5g
 - sysupgrade
 - ...

not working:
 - wifi 2g

Signed-off-by: Johann Neuhauser <johann@it-neuhauser.de>
2018-05-22 20:53:15 +02:00

44 lines
664 B
Bash

#!/bin/sh
. /lib/functions/leds.sh
status_led="$(get_dt_led status)"
get_status_led() {
local board=$(board_name)
local boardname="${board##*,}"
case $board in
"avm,fritz300e")
status_led="${boardname}:green:power"
;;
"glinet,ar150")
status_led="gl-ar150:orange:wlan"
;;
"tplink,tl-wr1043nd-v1")
status_led="tp-link:green:system"
;;
"ubnt,unifi")
status_led="ubnt:green:dome"
;;
esac
}
set_state() {
[ -z "$status_led" ] && get_status_led
case "$1" in
preinit)
status_led_blink_preinit
;;
failsafe)
status_led_blink_failsafe
;;
preinit_regular)
status_led_blink_preinit_regular
;;
done)
status_led_on
;;
esac
}