lantiq: xway: rename nas0/ptm0 to dsl0
[openwrt/openwrt.git] / target / linux / lantiq / base-files / etc / board.d / 01_leds
1 #!/bin/sh
2 #
3 # Copyright (C) 2011-2015 OpenWrt.org
4 # based on ar71xx
5 #
6
7 . /lib/functions/uci-defaults.sh
8 . /lib/functions/lantiq.sh
9
10 board_config_update
11
12 led_wifi="$(lantiq_get_dt_led wifi)"
13 [ -n "$led_wifi" ] && ucidef_set_led_wlan "wifi" "wifi" "$led_wifi" "phy0tpt"
14
15 led_usb="$(lantiq_get_dt_led usb)"
16 [ -n "$led_usb" ] && ucidef_set_led_usbdev "usb" "usb" "$led_usb" "1-1"
17
18 led_usb2="$(lantiq_get_dt_led usb2)"
19 [ -n "$led_usb2" ] && ucidef_set_led_usbdev "usb2" "usb2" "$led_usb2" "2-1"
20
21 led_dsl="$(lantiq_get_dt_led dsl)"
22 [ -n "$led_dsl" ] && {
23 led_internet="$(lantiq_get_dt_led internet)"
24 if [ -n "$led_internet" ]; then
25 ucidef_set_led_default "dsl" "dsl" "$led_dsl" "0"
26 ucidef_set_led_netdev "internet" "internet" "$led_internet" "pppoe-wan"
27 else
28 ucidef_set_led_netdev "dsl" "dsl" "$led_dsl" "dsl0"
29 fi
30 }
31
32 board=$(board_name)
33
34 case "$board" in
35 ALL0333CJ)
36 ucidef_set_led_netdev "lan" "lan" "all0333cj:green:lan" "eth0.1"
37 ;;
38 ARV4525PW)
39 ucidef_set_led_netdev "wifi" "wifi" "arv4525pw:green:wlan" "wlan0"
40 ;;
41 ARV7506PW11)
42 ucidef_set_led_wlan "wifi" "wifi" "arv7506pw11:green:wlan" "phy0radio"
43 ;;
44 ARV7519RW22)
45 ucidef_set_led_netdev "lan" "lan" "arv7519rw22:green:lan" "eth0.1"
46 ;;
47 ARV752DPW22)
48 ucidef_set_led_wlan "wifi" "wifi" "arv752dpw22:red:wifi" "phy0radio"
49 ;;
50 BTHOMEHUBV5A)
51 ucidef_set_led_default "dimmed" "dimmed" "dimmed" "0"
52 ;;
53 DM200)
54 ucidef_set_led_netdev "lan" "lan" "dm200:green:lan" "eth0"
55 ;;
56 FRITZ7320)
57 ucidef_set_led_netdev "wifi" "wifi" "fritz7320:green:wlan" "wlan0"
58 ;;
59 P2812HNUF*)
60 ucidef_set_led_wlan "wifi" "wifi" "p2812hnufx:green:wlan" "phy0radio"
61 ;;
62 VGV7510KW22*)
63 ucidef_set_led_wlan "wifi" "wifi" "vgv7510kw22:green:wlan" "phy0radio"
64 ;;
65 VGV7519*)
66 ucidef_set_led_wlan "wifi" "wifi" "vgv7519:green:wireless" "phy0radio"
67 ;;
68 WBMR300)
69 ucidef_set_led_switch "lan1" "LAN1" "wbmr300:green:lan1" "switch0" "0x08"
70 ucidef_set_led_switch "lan2" "LAN2" "wbmr300:green:lan2" "switch0" "0x04"
71 ucidef_set_led_switch "wan" "WAN" "wbmr300:green:wan" "switch0" "0x10"
72 ucidef_set_led_switch "lan3" "LAN3" "wbmr300:green:lan3" "switch0" "0x20"
73 ucidef_set_led_default "router" "router" "wbmr300:green:router" "1"
74 ;;
75 *)
76 ;;
77 esac
78
79 board_config_flush
80
81 exit 0