#!/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