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
36 mac=$(ramips_get_mac_binary factory 40)
37 ifconfig eth0 hw ether $mac 2>/dev/null
40 mac=$(ramips_get_mac_binary board-nvram 65440)
41 ifconfig eth0 hw ether $mac 2>/dev/null
44 mac=$(ramips_get_mac_binary devconf 4)
45 ifconfig eth0 hw ether $mac 2>/dev/null
50 boot_hook_add preinit_main preinit_set_mac_address