aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ramips
diff options
context:
space:
mode:
authorJohn Crispin <john@openwrt.org>2014-07-14 07:38:23 +0000
committerJohn Crispin <john@openwrt.org>2014-07-14 07:38:23 +0000
commit4af1b51ec3797318645f6fbc52278b0473a2b3f9 (patch)
treed4bd9ce42c5287ad2c788d0d2f038d0f9525cc02 /target/linux/ramips
parent1d11ffa4f2c379c3b2e5ec247f3cc7707112d97e (diff)
downloadupstream-4af1b51ec3797318645f6fbc52278b0473a2b3f9.tar.gz
upstream-4af1b51ec3797318645f6fbc52278b0473a2b3f9.tar.bz2
upstream-4af1b51ec3797318645f6fbc52278b0473a2b3f9.zip
ramips: extract default lan_mac from eth0
The default case of ramips_setup_macs() is useful when mtd-mac-address is defined in dts. But lan_mac is not set by default, this results in lan and wan having the same mac. Signed-off-by: Roman Yeryomin <roman@advem.lv> SVN-Revision: 41632
Diffstat (limited to 'target/linux/ramips')
-rwxr-xr-xtarget/linux/ramips/base-files/etc/uci-defaults/02_network1
1 files changed, 1 insertions, 0 deletions
diff --git a/target/linux/ramips/base-files/etc/uci-defaults/02_network b/target/linux/ramips/base-files/etc/uci-defaults/02_network
index 472ae588d5..39f46bb979 100755
--- a/target/linux/ramips/base-files/etc/uci-defaults/02_network
+++ b/target/linux/ramips/base-files/etc/uci-defaults/02_network
@@ -258,6 +258,7 @@ ramips_setup_macs()
;;
*)
+ lan_mac=$(cat /sys/class/net/eth0/address)
wan_mac=$(macaddr_add "$lan_mac" 1)
;;