LED handling fixes for WRT54-G3Gv2
authorMarkus Wigge <mwigge@marcant.net>
Mon, 2 Aug 2010 10:32:39 +0000 (10:32 +0000)
committerMarkus Wigge <mwigge@marcant.net>
Mon, 2 Aug 2010 10:32:39 +0000 (10:32 +0000)
SVN-Revision: 22462

package/comgt/Makefile
package/comgt/files/3g.sh

index 253e12af0e036503a7584da8bfe6bdb611b8f31a..b0a55ffecf254524943485c2cc564f021ad43211 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=comgt
 PKG_VERSION:=0.32
-PKG_RELEASE:=4
+PKG_RELEASE:=5
 
 PKG_SOURCE:=$(PKG_NAME).$(PKG_VERSION).tgz
 PKG_SOURCE_URL:=@SF/comgt
@@ -49,7 +49,7 @@ define Package/comgt/install
        $(INSTALL_DATA) ./files/3g.chat $(1)/etc/chatscripts/3g.chat
        $(INSTALL_DATA) ./files/evdo.chat $(1)/etc/chatscripts/evdo.chat
        $(INSTALL_DIR) $(1)/lib/network
-       $(INSTALL_DATA) ./files/3g.sh $(1)/lib/network/3g.sh
+       $(INSTALL_BIN) ./files/3g.sh $(1)/lib/network/3g.sh
        $(INSTALL_DIR) $(1)/etc/hotplug.d/button
        $(INSTALL_DATA) ./files/3g.button $(1)/etc/hotplug.d/button/05-3g
        $(INSTALL_DIR) $(1)/etc/hotplug.d/iface
index 59e99c761dd117236e8ad012b1c19cd51138aa2a..c6f8ffbfc2bc0163ae60be90b45d2eaa053fb3eb 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
 }