ath79: preliminary support for TP-Link WDR3600 / WDR4300 (AR9344)
[openwrt/openwrt.git] / target / linux / ath79 / base-files / etc / diag.sh
index 8022151378ca2fdcaf952a25f4fdd3c83e4612eb..b18463413a41607c10c3bee2c7876e042486626d 100644 (file)
@@ -2,6 +2,8 @@
 
 . /lib/functions/leds.sh
 
+status_led="$(get_dt_led status)"
+
 get_status_led() {
        local board=$(board_name)
        local boardname="${board##*,}"
@@ -23,7 +25,7 @@ get_status_led() {
 }
 
 set_state() {
-       get_status_led
+       [ -z "$status_led" ] && get_status_led
 
        case "$1" in
        preinit)