mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-27 17:18:59 +00:00
bfd20cb57d
SVN-Revision: 17100
25 lines
462 B
Plaintext
25 lines
462 B
Plaintext
#
|
|
# Copyright (C) 2009 OpenWrt.org
|
|
#
|
|
|
|
. /lib/ar71xx.sh
|
|
|
|
tew632brp_init_mac_address() {
|
|
local mtd mac
|
|
|
|
mtd=$(grep config /proc/mtd | cut -d: -f1)
|
|
[ -z $mtd ] && return
|
|
|
|
mac=$(grep lan_mac /dev/$mtd | cut -d= -f2)
|
|
[ ! -z $mac ] && ifconfig eth0 hw ether $mac 2>/dev/null
|
|
|
|
mac=$(grep wan_mac /dev/$mtd | cut -d= -f2)
|
|
[ ! -z $mac ] && ifconfig eth1 hw ether $mac 2>/dev/null
|
|
}
|
|
|
|
case $(ar71xx_board_name) in
|
|
tew-632brp)
|
|
tew632brp_init_mac_address
|
|
;;
|
|
esac
|