2005-02-06 00:52:16 +00:00
|
|
|
# NVRAM overrides
|
|
|
|
#
|
|
|
|
# This file handles the NVRAM quirks of various hardware.
|
|
|
|
# THIS FILE IS NOT A REPLACEMENT FOR NVRAM
|
|
|
|
|
2005-03-06 03:34:52 +00:00
|
|
|
# Load sysconf defaults
|
|
|
|
[ -f /etc/sysconf ] && . /etc/sysconf
|
|
|
|
|
2005-02-06 00:52:16 +00:00
|
|
|
# hacks for wrt54g 1.x hardware
|
2005-07-16 10:18:01 +00:00
|
|
|
[ "$(nvram get boardnum)" = "42" \
|
2005-08-25 12:11:27 +00:00
|
|
|
-a "$(nvram get boardtype)" = "bcm94710dev" ] && FAILSAFE_ifnames="vlan1 vlan2 eth2"
|
2005-02-06 00:52:16 +00:00
|
|
|
|
2005-04-29 07:18:24 +00:00
|
|
|
# hacks for asus wl-500g deluxe
|
2005-07-16 10:18:01 +00:00
|
|
|
[ "$(nvram get boardtype)" = "bcm95365r" \
|
2005-08-25 12:11:27 +00:00
|
|
|
-a "$(nvram get boardnum)" = "45" ] && FAILSAFE_ifnames="vlan0 eth1"
|
2005-07-01 23:17:06 +00:00
|
|
|
|
2005-02-06 00:52:16 +00:00
|
|
|
# hacks for wap54g hardware
|
2005-07-16 10:18:01 +00:00
|
|
|
[ "$(nvram get boardnum)" = "2" \
|
2005-08-25 12:11:27 +00:00
|
|
|
-o "$(nvram get boardnum)" = "1024" ] && FAILSAFE_ifnames="eth0 eth1"
|
2005-03-19 17:52:30 +00:00
|
|
|
|
2005-02-17 23:19:24 +00:00
|
|
|
# hack for asus wl-500g hardware
|
2005-08-25 12:11:27 +00:00
|
|
|
[ "$(nvram get boardnum)" = "asusX" \
|
|
|
|
-a "$(nvram get boardtype)" = "bcm94710dev" ] && FAILSAFE_ifnames="eth0 eth1 eth2"
|
|
|
|
|
2005-09-06 19:47:11 +00:00
|
|
|
FAILSAFE_ifnames=${FAILSAFE_ifnames:-"vlan0 eth1 eth2"}
|
2005-02-06 00:52:16 +00:00
|
|
|
|
2005-07-21 14:02:53 +00:00
|
|
|
DEFAULT_lan_ipaddr=${BR2_SYSCONF_FAILSAFE_IP:-"192.168.1.1"}
|
|
|
|
DEFAULT_lan_netmask=${BR2_SYSCONF_FAILSAFE_NETMASK:-"255.255.255.0"}
|
|
|
|
DEFAULT_lan_hwaddr=${BR2_SYSCONF_FAILSAFE_MAC:-"00:0B:AD:0A:DD:00"}
|
|
|
|
|
2005-02-06 00:52:16 +00:00
|
|
|
# failsafe if reset is held
|
|
|
|
[ "$FAILSAFE" = "true" ] && {
|
|
|
|
echo "### YOU ARE IN FAILSAFE MODE ####"
|
2005-08-25 12:11:27 +00:00
|
|
|
NVRAM_lan_ifname="br0"
|
|
|
|
NVRAM_lan_ifnames=$FAILSAFE_ifnames
|
|
|
|
NVRAM_lan_ipaddr=DEFAULT_lan_ipaddr
|
|
|
|
NVRAM_lan_netmask=DEFAULT_lan_netmask
|
|
|
|
NVRAM_lan_hwaddr=DEFAULT_lan_hwaddr
|
|
|
|
NVRAM_wan_ifname="none"
|
|
|
|
NVRAM_wifi_ifname="none"
|
2005-02-06 00:52:16 +00:00
|
|
|
}
|