replace resetmon with /proc/sys/reset
[oweals/openwrt.git] / obsolete-buildroot / sources / openwrt / root / etc / nvram.overrides
1 # NVRAM overrides
2 # This file handles the NVRAM quirks of various hardware.
3 #
4 # THIS FILE IS NOT A REPLACEMENT FOR NVRAM
5
6 # linksys bug has lan doing dhcp; force static
7 lan_proto="static"
8
9 # hacks for 1.x hardware
10 [ "$(nvram get boardnum)"  = "42" ] && \
11 [ "$(nvram get boardtype)" = "bcm94710dev" ] && {
12   debug "### 1.x hardware hack ###"
13   vlan1hwname="et0"
14   vlan2hwname="et0"
15
16   # we remap old device names to new
17   # it's recommended that you continue to
18   # use the old names to preserve backwards
19   # compatibility
20   remap () {
21     eval $1=\"$(nvram_get $1 | awk 'gsub("eth0","vlan2") gsub("eth1","vlan1")')\"
22   }
23
24   remap lan_ifname
25   remap lan_ifnames
26   remap wifi_ifname
27   remap wifi_ifnames
28   remap wan_ifname
29   remap wan_ifnames
30   remap pppoe_ifname
31 }
32
33 [ -z "$(nvram_get lan_ifname)" ] && {
34   lan_ifname="br0"
35   lan_ifnames="vlan0 vlan2 eth1 eth2 eth3"
36 }
37
38 [ -z "$(nvram_get wan_ifname)" ] && {
39    wan_ifname="vlan1"
40    wan_proto="dhcp"
41 }
42
43 # failsafe if reset is held
44 [ "$FAILSAFE" = "true" ] && {
45   echo "### FAILSAFE MODE ####"
46   lan_ifname="br0"
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"
51   wan_ifname="none"
52   wifi_ifname="none"
53 }