summaryrefslogtreecommitdiff
path: root/target/linux/mpc85xx/base-files/lib/preinit/05_set_iface_mac_mcp85xx
blob: cecaee86b00a94598a861c6dd66c5e0eb218f53f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/sh

. /lib/functions.sh
. /lib/functions/system.sh

preinit_set_mac_address() {
	case $(board_name) in
		hiveap-330)
			mac_wan=$(mtd_get_mac_binary hw-info 0)
			[ -n "$mac_wan" ] && ifconfig eth0 hw ether "$mac_wan"
			mac_lan=$(macaddr_add $(mtd_get_mac_binary hw-info 0) +1)
			[ -n "$mac_lan" ] && ifconfig eth1 hw ether "$mac_lan"
			;;
	esac
}

boot_hook_add preinit_main preinit_set_mac_address