cleanups to allow networking.sh to run on other hardware types (asus)
authorMike Baker <mbm@openwrt.org>
Wed, 14 Apr 2004 05:23:42 +0000 (05:23 +0000)
committerMike Baker <mbm@openwrt.org>
Wed, 14 Apr 2004 05:23:42 +0000 (05:23 +0000)
SVN-Revision: 13

root/etc/networking.sh

index bb85511b8351c6f1080fd736ec997855bb1d48b9..1a2be2e9d91af7cb33b6b6de2066ba72f40e9e6a 100755 (executable)
@@ -39,9 +39,9 @@ if_valid () {
 
 wifi_init () {
   echo "# --- wifi init ---"
-  hwaddr=$(nvram_get il0macaddr)
-  [ -z "$hwaddr" ] && hwaddr=$(nvram_get wl0_hwaddr)
-  if=$(mac2if $hwaddr)
+  # assume wifi is eth2, fall back to eth1
+  if="eth2"
+  if_valid $if || if="eth1"
   $DEBUG wlconf $if up
 }
 
@@ -123,7 +123,8 @@ wifi_init
 $DEBUG vconfig set_name_type VLAN_PLUS_VID_NO_PAD
 
 # hacks for 1.x hardware
-[ -z "$(nvram_get vlan0hwname)" ] && {
+[ "$(nvram get boardnum)"  = "42" ] && \
+[ "$(nvram get boardtype)" = "bcm94710dev" ] && {
   echo "# 1.x HACK"
   vlan1hwname="et0"
   vlan2hwname="et0"