LED handling fixes for WRT54-G3Gv2
[openwrt.git] / package / comgt / files / 3g.sh
index 59e99c7..c6f8ffb 100644 (file)
@@ -1,9 +1,10 @@
 set_3g_led() {
        # set on WRT54G3G only
-       [ -d /proc/diag ] || return 0
-       grep WRT54G3G /proc/diag/model >/dev/null || return 0
+       [ -f /proc/diag/model ] || return 0
+       grep -q "WRT54G3G" /proc/diag/model >/dev/null || return 0
        echo "$1" > /proc/diag/led/3g_green
        echo "$2" > /proc/diag/led/3g_blue
+       grep -q "WRT54G3G$" /proc/diag/model >/dev/null || return 0
        echo "$3" > /proc/diag/led/3g_blink
 }
 
This page took 0.025782 seconds and 4 git commands to generate.