1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-09-27 02:06:22 +03:00
openwrt-xburst/target/linux/ar71xx/base-files/etc/preinit.arch
juhosg 70a7b4cd68 [ar71xx] init mac address on the TEW-632BRP boards (closes #5403)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@17100 3c298f89-4303-0410-b956-a3cf2f4a3e73
2009-08-03 07:48:21 +00:00

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