summaryrefslogtreecommitdiff
path: root/target/linux/ar71xx/base-files/etc/uci-defaults/wzr-hp-g300nh
blob: 1308a7bb04a585bc8be976a96beec1ff92089718 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/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'
add system led
set system.@led[-1]='led'
set system.@led[-1].name='USB'
set system.@led[-1].sysfs='wzr-hp-g300nh:blue:usb'
set system.@led[-1].trigger='usbdev'
set system.@led[-1].dev='1-1'
set system.@led[-1].interval='50'
commit system
EOF
}

if [ "${board}" == "wzr-hp-g300nh" ]; then
	wzrhpg300nh_set_leds
fi