source: trunk/target/linux/ramips/base-files/lib/preinit/06_set_iface_mac @ 29603

Last change on this file since 29603 was 29603, checked in by juhosg, 5 years ago

ramips: add support for the Senao/EnGenius ESR-9753 board

Signed-off-by: Artur Wronowski <arteqw@…>

File size: 650 bytes
Line 
1#
2# Copyright (C) 2011 OpenWrt.org
3#
4
5preinit_set_mac_address() {
6        local mac
7
8        . /lib/ramips.sh
9
10        case $(ramips_board_name) in
11        bc2 | nw718 | esr-9753)
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        dir-300-b1 |\
17        dir-300-b2 |\
18        dir-600-b1)
19                mac=$(ramips_get_mac_binary devdata 16388)
20                ifconfig eth0 hw ether $mac 2>/dev/null
21                ;;
22        hw550-3g |\
23        nbg-419n |\
24        omni-emb)
25                mac=$(ramips_get_mac_binary factory 40)
26                ifconfig eth0 hw ether $mac 2>/dev/null
27                ;;
28        esac
29}
30
31boot_hook_add preinit_main preinit_set_mac_address
Note: See TracBrowser for help on using the repository browser.