Fix MAC address getters for current OpenWRT

This commit is contained in:
Matthias Schiffer 2013-09-28 23:32:34 +02:00
parent c19b4efd05
commit f2d9bdaba7
2 changed files with 4 additions and 4 deletions

View File

@ -34,10 +34,10 @@ EOF
get_main_address() { get_main_address() {
case "$board" in case "$board" in
tl-wdr3600|tl-wdr4300) tl-wdr3600|tl-wdr4300)
uci get wireless.radio1.macaddr cat /sys/class/ieee80211/phy1/macaddress
;; ;;
*) *)
uci get wireless.radio0.macaddr cat /sys/class/ieee80211/phy0/macaddress
;; ;;
esac esac
} }

View File

@ -7,7 +7,7 @@ board="$(ar71xx_board_name)"
case "$board" in case "$board" in
tl-wdr3600|\ tl-wdr3600|\
tl-wdr4300) tl-wdr4300)
macaddr="$(uci get wireless.radio1.macaddr)" macaddr="$(cat /sys/class/ieee80211/phy1/macaddress)"
uci -q batch <<EOF uci -q batch <<EOF
set system.led_wlan2g.trigger='netdev' set system.led_wlan2g.trigger='netdev'
@ -23,7 +23,7 @@ tl-wdr4300)
EOF EOF
;; ;;
*) *)
macaddr="$(uci get wireless.radio0.macaddr)" macaddr="$(cat /sys/class/ieee80211/phy0/macaddress)"
uci -q batch <<EOF uci -q batch <<EOF
set system.led_wlan.trigger='netdev' set system.led_wlan.trigger='netdev'