3 # Copyright (C) 2011 OpenWrt.org
11 [ -z $(which maccalc) ] && return
15 part=$(find_mtd_part "factory")
16 [ -z $part ] && return
18 lan_mac=$(dd bs=1 skip=4 count=6 if=$part 2>/dev/null | maccalc bin2mac)
19 [ -z $lan_mac ] && return
21 wan_mac=$(maccalc add $lan_mac 1)
24 set network.lan.macaddr='$lan_mac'
25 set network.wan.macaddr='$wan_mac'
32 board=$(ramips_board_name)
34 if [ "${board}" == "bc2" ]; then