3 # This file handles the NVRAM quirks of various hardware.
4 # THIS FILE IS NOT A REPLACEMENT FOR NVRAM
6 # Load sysconf defaults
7 [ -f /etc/sysconf ] && . /etc/sysconf
9 DEFAULT_lan_proto="static"
10 DEFAULT_lan_ifname="br0"
11 DEFAULT_lan_ifnames="eth0"
12 DEFAULT_lan_ipaddr=${BR2_SYSCONF_FAILSAFE_IP:-"192.168.1.1"}
13 DEFAULT_lan_netmask=${BR2_SYSCONF_FAILSAFE_NETMASK:-"255.255.255.0"}
14 DEFAULT_lan_hwaddr=`echo $(strings /dev/mtdblock/3 | grep -A1 maca | grep :)`
15 DEFAULT_lan_hwaddr=${DEFAULT_lan_hwaddr##* }
16 DEFAULT_lan_hwaddr=${DEFAULT_lan_hwaddr:-${BR2_SYSCONF_FAILSAFE_MAC:-"00:0B:AD:0A:DD:00"}}
18 # failsafe if reset is held
19 [ "$FAILSAFE" = "true" ] && {
20 echo "### YOU ARE IN FAILSAFE MODE ####"
21 lan_ifname=${DEFAULT_lan_proto}
22 lan_ifnames=${FAILSAFE_ifnames:-${DEFAULT_lan_ifnames}}
23 lan_ipaddr=$DEFAULT_lan_ipaddr
24 lan_netmask=$DEFAULT_lan_netmask
25 lan_hwaddr=$DEFAULT_lan_hwaddr