backfire: ar71xx: populate LED configuration for WZR-HP-G300NH (backport of r24642)
authorGabor Juhos <juhosg@openwrt.org>
Sat, 8 Jan 2011 10:17:45 +0000 (10:17 +0000)
committerGabor Juhos <juhosg@openwrt.org>
Sat, 8 Jan 2011 10:17:45 +0000 (10:17 +0000)
SVN-Revision: 24923

target/linux/ar71xx/base-files/etc/uci-defaults/wzr-hp-g300nh [new file with mode: 0755]

diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/wzr-hp-g300nh b/target/linux/ar71xx/base-files/etc/uci-defaults/wzr-hp-g300nh
new file mode 100755 (executable)
index 0000000..5602aab
--- /dev/null
@@ -0,0 +1,30 @@
+#!/bin/sh
+#
+# Copyright (C) 2010 OpenWrt.org
+#
+
+. /lib/ar71xx.sh
+
+board=$(ar71xx_board_name)
+
+wzrhpg300nh_set_leds() {
+       uci batch <<EOF
+add system led
+set system.@led[-1]='led'
+set system.@led[-1].name='Wireless'
+set system.@led[-1].sysfs='wzr-hp-g300nh:green:wireless'
+set system.@led[-1].trigger='phy0tpt'
+add system led
+set system.@led[-1]='led'
+set system.@led[-1].name='Router'
+set system.@led[-1].sysfs='wzr-hp-g300nh:green:router'
+set system.@led[-1].trigger='netdev'
+set system.@led[-1].dev='eth1'
+set system.@led[-1].mode='link tx rx'
+commit system
+EOF
+}
+
+if [ "${board}" == "wzr-hp-g300nh" ]; then
+       wzrhpg300nh_set_leds
+fi