2 # Copyright (C) 2009 OpenWrt.org
13 mtd=$(grep $mtd_part /proc/mtd | cut -d: -f1)
16 mac=$(grep $lan_env /dev/$mtd | cut -d= -f2)
17 [ ! -z $mac ] && ifconfig eth0 hw ether $mac 2>/dev/null
19 mac=$(grep $wan_env /dev/$mtd | cut -d= -f2)
20 [ ! -z $mac ] && ifconfig eth1 hw ether $mac 2>/dev/null
23 preinit_load_modules() {
30 preinit_set_mac_address() {
31 case $(ar71xx_board_name) in
33 fetch_mac_from_mtd config lan_mac wan_mac
36 fetch_mac_from_mtd config lan_mac wan_mac
37 echo 1 > /sys/class/leds/dir-615-c1:green:wancpu/brightness
40 fetch_mac_from_mtd nvram lan_hwaddr wan_hwaddr
45 preinit_set_mac_address
52 netmsg 192.168.1.255 "Press any button now, to enter Failsafe!"
54 ifconfig "$ifname" 0.0.0.0 down