all targets: use numerically prefixed uci-defaults file names to better control order...
[openwrt/svn-archive/archive.git] / target / linux / ramips / base-files / etc / uci-defaults / 01_leds
1 #!/bin/sh
2
3 . /lib/functions/uci-defaults.sh
4 . /lib/ramips.sh
5
6 set_usb_led() {
7 ucidef_set_led_usbdev "usb" "USB" "$1" "1-1"
8 }
9
10 set_wifi_led() {
11 ucidef_set_led_netdev "wifi_led" "wifi" "$1" "wlan0"
12 }
13
14 board=$(ramips_board_name)
15
16 case $board in
17 3g-6200n)
18 set_wifi_led "edimax:amber:wlan"
19 set_usb_led "edimax:blue:3g"
20 ;;
21 air3gii)
22 set_wifi_led "airlive:green:wlan"
23 set_usb_led "airlive:green:mobile"
24 ;;
25 all0256n)
26 ucidef_set_rssimon "wlan0" "40000" "1"
27 ucidef_set_led_rssi "rssilow" "RSSILOW" "all0256n:green:rssilow" "wlan0" "1" "40" "0" "6"
28 ucidef_set_led_rssi "rssimedium" "RSSIMEDIUM" "all0256n:green:rssimed" "wlan0" "30" "80" "-29" "5"
29 ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "all0256n:green:rssihigh" "wlan0" "70" "100" "-69" "8"
30 set_wifi_led "rt2800pci-phy0::radio"
31 ;;
32 bc2)
33 set_usb_led "bc2:blue:usb"
34 ;;
35 broadway)
36 set_usb_led "red:diskmounted"
37 set_wifi_led "red:wps_active"
38 ;;
39 br6524n)
40 set_wifi_led "edimax:blue:wlan"
41 ;;
42 dir-300-b1|\
43 dir-600-b1|\
44 dir-600-b2|\
45 dir-620-a1)
46 # ANDed with vlan switch port 4 led state
47 ucidef_set_led_default "wan" "WAN LED (amber)" "d-link:amber:wan" "1"
48 set_wifi_led "rt2800pci-phy0::radio"
49 ;;
50 dir-615-d|\
51 dir-615-h1)
52 ucidef_set_led_default "status" "Status LED (amber)" "d-link:amber:status" "0"
53 set_wifi_led "rt2800pci-phy0::radio"
54 ;;
55 esr-9753)
56 set_wifi_led "rt2800pci-phy0::radio"
57 ;;
58 f5d8235-v1)
59 set_usb_led "f5d8235-v1:blue:storage"
60 ;;
61 f5d8235-v2)
62 set_usb_led "f5d8235v2:blue:storage"
63 ;;
64 fonera20n)
65 set_usb_led "fonera20n:orange:usb"
66 set_wifi_led "fonera20n:orange:wifi"
67 ;;
68 all0239-3g|\
69 hw550-3g)
70 set_usb_led "hw550-3g:green:usb"
71 ;;
72 mofi3500-3gn)
73 set_usb_led "mofi3500-3gn:green:usb"
74 ;;
75 mzk-w300nh2)
76 set_wifi_led "mzkw300nh2:amber:wlan"
77 ;;
78 nw718)
79 set_usb_led "nw718:amber:usb"
80 ;;
81 sl-r7205)
82 set_wifi_led "rt2800pci-phy0::radio"
83 ;;
84 v11st-fe)
85 set_wifi_led "rt2800pci-phy0::radio"
86 ;;
87 w306r-v20)
88 set_wifi_led "rt2800pci-phy0::radio"
89 ;;
90 w502u)
91 set_usb_led "alfa:blue:usb"
92 set_wifi_led "rt2800pci-phy0::radio"
93 ;;
94 wcr-150gn)
95 set_usb_led "wcr150gn:amber:user"
96 ;;
97 esac
98
99 ucidef_commit_leds
100
101 exit 0