2005-02-06 02:52:16 +02:00
|
|
|
# NVRAM overrides
|
|
|
|
#
|
|
|
|
# This file handles the NVRAM quirks of various hardware.
|
|
|
|
# THIS FILE IS NOT A REPLACEMENT FOR NVRAM
|
|
|
|
|
2005-03-06 05:34:52 +02:00
|
|
|
# Load sysconf defaults
|
|
|
|
[ -f /etc/sysconf ] && . /etc/sysconf
|
|
|
|
|
2005-02-06 02:52:16 +02:00
|
|
|
# hacks for wrt54g 1.x hardware
|
2005-07-16 13:18:01 +03:00
|
|
|
[ "$(nvram get boardnum)" = "42" \
|
2005-10-12 18:05:24 +03:00
|
|
|
-a "$(nvram get boardtype)" = "bcm94710dev" ] && FAILSAFE_ifnames="vlan0 vlan2 eth2"
|
2005-02-06 02:52:16 +02:00
|
|
|
|
2005-04-29 10:18:24 +03:00
|
|
|
# hacks for asus wl-500g deluxe
|
2005-07-16 13:18:01 +03:00
|
|
|
[ "$(nvram get boardtype)" = "bcm95365r" \
|
2005-08-25 15:11:27 +03:00
|
|
|
-a "$(nvram get boardnum)" = "45" ] && FAILSAFE_ifnames="vlan0 eth1"
|
2005-07-02 02:17:06 +03:00
|
|
|
|
2005-02-06 02:52:16 +02:00
|
|
|
# hacks for wap54g hardware
|
2005-07-16 13:18:01 +03:00
|
|
|
[ "$(nvram get boardnum)" = "2" \
|
2005-08-25 15:11:27 +03:00
|
|
|
-o "$(nvram get boardnum)" = "1024" ] && FAILSAFE_ifnames="eth0 eth1"
|
2005-03-19 19:52:30 +02:00
|
|
|
|
2005-02-18 01:19:24 +02:00
|
|
|
# hack for asus wl-500g hardware
|
2005-08-25 15:11:27 +03:00
|
|
|
[ "$(nvram get boardnum)" = "asusX" \
|
|
|
|
-a "$(nvram get boardtype)" = "bcm94710dev" ] && FAILSAFE_ifnames="eth0 eth1 eth2"
|
|
|
|
|
2005-09-06 22:47:11 +03:00
|
|
|
FAILSAFE_ifnames=${FAILSAFE_ifnames:-"vlan0 eth1 eth2"}
|
2005-02-06 02:52:16 +02:00
|
|
|
|
2005-07-21 17:02:53 +03: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 02:52:16 +02:00
|
|
|
# failsafe if reset is held
|
|
|
|
[ "$FAILSAFE" = "true" ] && {
|
|
|
|
echo "### YOU ARE IN FAILSAFE MODE ####"
|
2005-11-17 00:12:18 +02:00
|
|
|
lan_ifname="br0"
|
|
|
|
lan_ifnames=$FAILSAFE_ifnames
|
2005-11-17 00:22:26 +02:00
|
|
|
lan_ipaddr=$DEFAULT_lan_ipaddr
|
|
|
|
lan_netmask=$DEFAULT_lan_netmask
|
|
|
|
lan_hwaddr=$DEFAULT_lan_hwaddr
|
2005-11-17 00:12:18 +02:00
|
|
|
wan_ifname="none"
|
|
|
|
wifi_ifname="none"
|
2005-02-06 02:52:16 +02:00
|
|
|
}
|