2 # Copyright (C) 2011 OpenWrt.org
5 preinit_set_mac_address() {
10 case $(ramips_board_name) in
17 mac=$(ramips_get_mac_binary factory 4)
18 mac=$(maccalc or "$mac" "02:00:00:00:00:00")
19 ifconfig eth0 hw ether $mac 2>/dev/null
24 mac=$(ramips_get_mac_binary devdata 16388)
25 ifconfig eth0 hw ether $mac 2>/dev/null
37 mac=$(ramips_get_mac_binary factory 40)
38 ifconfig eth0 hw ether $mac 2>/dev/null
41 mac=$(ramips_get_mac_binary board-nvram 65440)
42 ifconfig eth0 hw ether $mac 2>/dev/null
45 mac=$(ramips_get_mac_binary devconf 4)
46 ifconfig eth0 hw ether $mac 2>/dev/null
51 boot_hook_add preinit_main preinit_set_mac_address