fix wificonf build depends
[openwrt.git] / root / etc / nvram.overrides
1 # NVRAM overrides
2 # This file handles the NVRAM quirks of various hardware
3 # this is not a replacement for nvram.
4
5 # linksys bug has lan doing dhcp; force static
6 lan_proto="static"
7
8 # failsafe if reset is held
9 [ "$FAILSAFE" = "true" ] && {
10 echo "### FAILSAFE MODE ####"
11 lan_ifname="br0"
12 lan_ifnames="vlan0 vlan2 eth1 eth2 eth3"
13 lan_ipaddr="192.168.1.1"
14 lan_netmask="255.255.255.0"
15 lan_hwaddr="00:0B:AD:0A:DD:00"
16 wan_ifname="none"
17 wifi_ifname="none"
18 }
19
20 # hacks for 1.x hardware
21 [ "$(nvram get boardnum)" = "42" ] && \
22 [ "$(nvram get boardtype)" = "bcm94710dev" ] && {
23 debug "### 1.x hardware hack ###"
24 vlan1hwname="et0"
25 vlan2hwname="et0"
26
27 # we remap old device names to new
28 # it's recommended that you continue to
29 # use the old names to preserve backwards
30 # compatibility
31 remap () {
32 eval $1=\"$(nvram_get $1 | awk 'gsub("eth0","vlan2") gsub("eth1","vlan1")')\"
33 }
34
35 remap lan_ifname
36 remap lan_ifnames
37 remap wifi_ifname
38 remap wifi_ifnames
39 remap wan_ifname
40 remap wan_ifnames
41 remap pppoe_ifname
42 }
43
44 [ -z "$(nvram_get lan_ifname)" ] && {
45 lan_ifname="br0"
46 lan_ifnames="vlan0 vlan2 eth1 eth2 eth3"
47 }
48
49 [ -z "$(nvram_get wan_ifname)" ] && {
50 wan_ifname="vlan1"
51 wan_proto="dhcp"
52 }
This page took 0.038778 seconds and 5 git commands to generate.