summaryrefslogtreecommitdiffstats
path: root/openwrt/target/linux/package/base-files/files/brcm-2.4/etc/init.d/S05nvram
diff options
context:
space:
mode:
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2006-01-16 03:14:59 +0000
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2006-01-16 03:14:59 +0000
commitb7ee265303843ebf083ca60069a34a091bbaaeae (patch)
treeb3a11f32129b554f4faf006736cd01000e3c4248 /openwrt/target/linux/package/base-files/files/brcm-2.4/etc/init.d/S05nvram
parentb651ae2a92679b7df2a4560350c3fb0728f6a705 (diff)
port wan_device changes from whiterussian to kamikaze
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@2993 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'openwrt/target/linux/package/base-files/files/brcm-2.4/etc/init.d/S05nvram')
-rwxr-xr-xopenwrt/target/linux/package/base-files/files/brcm-2.4/etc/init.d/S05nvram26
1 files changed, 16 insertions, 10 deletions
diff --git a/openwrt/target/linux/package/base-files/files/brcm-2.4/etc/init.d/S05nvram b/openwrt/target/linux/package/base-files/files/brcm-2.4/etc/init.d/S05nvram
index 70fbd4662..a561b3965 100755
--- a/openwrt/target/linux/package/base-files/files/brcm-2.4/etc/init.d/S05nvram
+++ b/openwrt/target/linux/package/base-files/files/brcm-2.4/etc/init.d/S05nvram
@@ -107,6 +107,14 @@ case "$(nvram get productid)" in
nvram set lan_ifnames="eth1 eth2"
nvram set wan_ifname="none"
;;
+ *)
+ # wl-500g defaults. these are placed here, because WL-HDD and WL-300g
+ # might have the same nvram settings.
+ [ "$(nvram get boardnum)" = "asusX" \
+ -a "$(nvram get boardtype)" = "bcm94710dev" ] && {
+ nvram_default wan_device "eth1"
+ }
+ ;;
esac
# hacks for wap54g hardware
@@ -130,21 +138,12 @@ esac
nvram_default wl0id 0x4320
}
-WAN_PROTO="$(nvram get wan_proto)"
-[ "$WAN_PROTO" = "pptp" \
--o "$WAN_PROTO" = "pppoe" ] && {
- WAN_IFNAME="$(nvram get wan_ifname)"
- [ "${WAN_IFNAME%%[0-9]*}" = "ppp" ] || {
- nvram set wan_ifname=ppp0
- nvram set ${WAN_PROTO}_ifname="$WAN_IFNAME"
- }
-}
-
# defaults
nvram_default lan_ifname "br0"
nvram_default lan_ifnames "$FAILSAFE_ifnames"
nvram_default wan_ifname "vlan1"
+nvram_default wan_device "vlan1"
nvram_default wan_proto "dhcp"
nvram_default wl0_ssid OpenWrt
@@ -152,6 +151,13 @@ nvram_default wl0_mode ap
nvram_default wl0_infra 1
nvram_default wl0_radio 1
+WAN_PROTO="$(nvram get wan_proto)"
+WAN_IFNAME="$(nvram get wan_ifname)"
+case "$WAN_PROTO" in
+ pp*) [ "${WAN_IFNAME%%[0-9]*}" = "ppp" ] || nvram set wan_ifname=ppp0;;
+ *) [ "${WAN_IFNAME%%[0-9]*}" = "ppp" ] && nvram set wan_ifname="$(nvram get wan_device)";;
+esac
+
[ "$(nvram get il0macaddr)" = "00:90:4c:5f:00:2a" ] && {
# if default wifi mac, set two higher than the lan mac
nvram set il0macaddr=$(nvram get et0macaddr|