fdd8381f562b210d46f727b06d68bcb81bf4c050
[openwrt/staging/noltari.git] / target / linux / ath79 / nand / base-files / lib / preinit / 10_fix_eth_mac.sh
1 . /lib/functions.sh
2 . /lib/functions/system.sh
3
4 preinit_set_mac_address() {
5 case $(board_name) in
6 zyxel,nbg6716)
7 ethaddr=$(mtd_get_mac_ascii u-boot-env ethaddr)
8 ip link set dev eth0 address $(macaddr_add $ethaddr 2)
9 ip link set dev eth1 address $(macaddr_add $ethaddr 3)
10 ;;
11 esac
12 }
13
14 boot_hook_add preinit_main preinit_set_mac_address