mpc85xx: Add Aerohive HiveAP-330 Access Point
[openwrt/staging/stintel.git] / target / linux / mpc85xx / base-files / lib / preinit / 05_set_iface_mac_mcp85xx
1 #!/bin/sh
2
3 . /lib/functions.sh
4 . /lib/functions/system.sh
5
6 preinit_set_mac_address() {
7 case $(board_name) in
8 hiveap-330)
9 mac_wan=$(mtd_get_mac_binary hw-info 0)
10 [ -n "$mac_wan" ] && ifconfig eth0 hw ether "$mac_wan"
11 mac_lan=$(macaddr_add $(mtd_get_mac_binary hw-info 0) +1)
12 [ -n "$mac_lan" ] && ifconfig eth1 hw ether "$mac_lan"
13 ;;
14 esac
15 }
16
17 boot_hook_add preinit_main preinit_set_mac_address