diff options
author | Adrian Schmutzler <freifunk@adrianschmutzler.de> | 2019-07-21 02:05:53 +0200 |
---|---|---|
committer | Chuanhong Guo <gch981213@gmail.com> | 2019-07-25 22:07:21 +0800 |
commit | ee650ba46ca9cbd893f7e0cb06cf24cdabfa6ae7 (patch) | |
tree | 6efd16c18652e8d0af30e53b97bc1c8b617f921b /target | |
parent | f72d2ba60a5238d52ceaccd8e3e4b193a4534229 (diff) | |
download | upstream-ee650ba46ca9cbd893f7e0cb06cf24cdabfa6ae7.tar.gz upstream-ee650ba46ca9cbd893f7e0cb06cf24cdabfa6ae7.tar.bz2 upstream-ee650ba46ca9cbd893f7e0cb06cf24cdabfa6ae7.zip |
ramips: remove needless setting of lan_mac to eth0 in 02_network
This removes superfluous lines like
lan_mac=$(cat /sys/class/net/eth0/address)
Since lan_mac only sets the MAC address for eth0.1, these lines
can be safely removed as the address will be inherited from eth0
anyway.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Diffstat (limited to 'target')
-rwxr-xr-x | target/linux/ramips/base-files/etc/board.d/02_network | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network index df1e4ce222..7c969555e3 100755 --- a/target/linux/ramips/base-files/etc/board.d/02_network +++ b/target/linux/ramips/base-files/etc/board.d/02_network @@ -579,12 +579,10 @@ ramips_setup_macs() wan_mac=$(mtd_get_mac_ascii u-boot-env WAN_MAC_ADDR) ;; edimax,br-6475nd) - lan_mac=$(cat /sys/class/net/eth0/address) wan_mac=$(mtd_get_mac_binary devdata 7) ;; edimax,br-6478ac-v2) - lan_mac=$(cat /sys/class/net/eth0/address) - wan_mac=$(macaddr_add "$lan_mac" 2) + wan_mac=$(macaddr_add "$(cat /sys/class/net/eth0/address)" 2) ;; elecom,wrc-1167ghbk2-s|\ elecom,wrc-1900gst|\ @@ -605,7 +603,6 @@ ramips_setup_macs() hootoo,ht-tm02|\ loewe,wmdr-143n|\ unbranded,a5-v11) - lan_mac=$(cat /sys/class/net/eth0/address) ;; iodata,wn-ac1167gr|\ iodata,wn-ac733gr3) @@ -662,8 +659,7 @@ ramips_setup_macs() wan_mac=$(mtd_get_mac_binary factory 40) ;; tenda,w306r-v2) - lan_mac=$(cat /sys/class/net/eth0/address) - wan_mac=$(macaddr_add "$lan_mac" 5) + wan_mac=$(macaddr_add "$(cat /sys/class/net/eth0/address)" 5) ;; trendnet,tew-691gr) wan_mac=$(macaddr_add "$(mtd_get_mac_binary factory 4)" 3) @@ -677,12 +673,10 @@ ramips_setup_macs() lan_mac=$(mtd_get_mac_binary factory 0xe006) ;; xiaomi,miwifi-mini) - wan_mac=$(cat /sys/class/net/eth0/address) - lan_mac=$(macaddr_setbit_la "$wan_mac") + lan_mac=$(macaddr_setbit_la "$(cat /sys/class/net/eth0/address)") ;; *) - lan_mac=$(cat /sys/class/net/eth0/address) - wan_mac=$(macaddr_add "$lan_mac" 1) + wan_mac=$(macaddr_add "$(cat /sys/class/net/eth0/address)" 1) ;; esac |