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