#!/bin/sh

. /lib/apm821xx.sh

preinit_set_mac_address() {
	case $(apm821xx_board_name) in
		mr24|\
		mx60)
			mac_lan=$(mtd_get_mac_binary_ubi board-config 102)
			[ -n "$mac_lan" ] && ifconfig eth0 hw ether "$mac_lan"
			;;
	esac
}

boot_hook_add preinit_main preinit_set_mac_address
