ramips: set mac addresses for the NBG-419N
[openwrt.git] / target / linux / ramips / base-files / lib / preinit / 06_set_iface_mac
1 #
2 # Copyright (C) 2011 OpenWrt.org
3 #
4
5 preinit_set_mac_address() {
6 local mac
7
8 . /lib/ramips.sh
9
10 case $(ramips_board_name) in
11 bc2 | nw718)
12 mac=$(ramips_get_mac_binary factory 4)
13 mac=$(maccalc or "$mac" "02:00:00:00:00:00")
14 ifconfig eth0 hw ether $mac 2>/dev/null
15 ;;
16 hw550-3g |\
17 nbg-419n)
18 mac=$(ramips_get_mac_binary factory 40)
19 ifconfig eth0 hw ether $mac 2>/dev/null
20 ;;
21 esac
22 }
23
24 boot_hook_add preinit_main preinit_set_mac_address
This page took 0.036354 seconds and 5 git commands to generate.