summaryrefslogtreecommitdiff
path: root/target/linux/apm821xx/base-files/lib/preinit/05_set_iface_mac_apm821xx
blob: 5dc717573082a830cce85e5fbfeabe432e57d9ef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/sh

. /lib/apm821xx.sh

preinit_set_mac_address() {
	case $(apm821xx_board_name) in
		mr24)
			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