2 # This file handles the NVRAM quirks of various hardware.
4 # THIS FILE IS NOT A REPLACEMENT FOR NVRAM
6 # linksys bug has lan doing dhcp; force static
9 # hacks for 1.x hardware
10 [ "$(nvram get boardnum)" = "42" ] && \
11 [ "$(nvram get boardtype)" = "bcm94710dev" ] && {
12 debug "### 1.x hardware hack ###"
16 # we remap old device names to new
17 # it's recommended that you continue to
18 # use the old names to preserve backwards
21 eval $1=\"$(nvram_get $1 | awk 'gsub("eth0","vlan2") gsub("eth1","vlan1")')\"
33 [ -z "$(nvram_get lan_ifname)" ] && {
35 lan_ifnames="vlan0 vlan2 eth1 eth2 eth3"
38 [ -z "$(nvram_get wan_ifname)" ] && {
43 # failsafe if reset is held
44 [ "$FAILSAFE" = "true" ] && {
45 echo "### FAILSAFE MODE ####"
47 lan_ifnames="vlan0 vlan2 eth1 eth2 eth3"
48 lan_ipaddr="192.168.1.1"
49 lan_netmask="255.255.255.0"
50 lan_hwaddr="00:0B:AD:0A:DD:00"