apm821xx: add support for the Cisco Meraki MR24
[openwrt/staging/dedeckeh.git] / target / linux / apm821xx / base-files / lib / preinit / 05_set_iface_mac_apm821xx
1 #!/bin/sh
2
3 . /lib/apm821xx.sh
4
5 preinit_set_mac_address() {
6 case $(apm821xx_board_name) in
7 mr24)
8 mac_lan=$(mtd_get_mac_binary_ubi board-config 102)
9 [ -n "$mac_lan" ] && ifconfig eth0 hw ether "$mac_lan"
10 ;;
11 esac
12 }
13
14 boot_hook_add preinit_main preinit_set_mac_address