diff options
author | mbm <mbm@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2004-08-12 05:47:00 +0000 |
---|---|---|
committer | mbm <mbm@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2004-08-12 05:47:00 +0000 |
commit | 512afda668386575e4d146d22161ca3afa3af728 (patch) | |
tree | 705b07b306a36c583e1d7e3f62dc6701bfd04118 /obsolete-buildroot/sources/openwrt/root/etc/nvram.overrides | |
parent | 58baf5ad434854d7d3326fa31bf2978b3cede26d (diff) |
moved.
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@134 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'obsolete-buildroot/sources/openwrt/root/etc/nvram.overrides')
-rw-r--r-- | obsolete-buildroot/sources/openwrt/root/etc/nvram.overrides | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/obsolete-buildroot/sources/openwrt/root/etc/nvram.overrides b/obsolete-buildroot/sources/openwrt/root/etc/nvram.overrides new file mode 100644 index 0000000000..e334d75198 --- /dev/null +++ b/obsolete-buildroot/sources/openwrt/root/etc/nvram.overrides @@ -0,0 +1,52 @@ +# NVRAM overrides +# This file handles the NVRAM quirks of various hardware +# this is not a replacement for nvram. + +# linksys bug has lan doing dhcp; force static +lan_proto="static" + +# failsafe if reset is held +[ "$FAILSAFE" = "true" ] && { + echo "### FAILSAFE MODE ####" + lan_ifname="br0" + lan_ifnames="vlan0 vlan2 eth1 eth2 eth3" + lan_ipaddr="192.168.1.1" + lan_netmask="255.255.255.0" + lan_hwaddr="00:0B:AD:0A:DD:00" + wan_ifname="none" + wifi_ifname="none" +} + +# hacks for 1.x hardware +[ "$(nvram get boardnum)" = "42" ] && \ +[ "$(nvram get boardtype)" = "bcm94710dev" ] && { + debug "### 1.x hardware hack ###" + vlan1hwname="et0" + vlan2hwname="et0" + + # we remap old device names to new + # it's recommended that you continue to + # use the old names to preserve backwards + # compatibility + remap () { + eval $1=\"$(nvram_get $1 | awk 'gsub("eth0","vlan2") gsub("eth1","vlan1")')\" + } + + remap lan_ifname + remap lan_ifnames + remap wifi_ifname + remap wifi_ifnames + remap wan_ifname + remap wan_ifnames + remap pppoe_ifname +} + +[ -z "$(nvram_get lan_ifname)" ] && { + lan_ifname="br0" + lan_ifnames="vlan0 vlan2 eth1 eth2 eth3" +} + +[ -z "$(nvram_get wan_ifname)" ] && { + wan_ifname="vlan1" + wan_proto="dhcp" +} |