Fixed network autoconfiguration as explained in #200, fixes #200
authorFlorian Fainelli <florian@openwrt.org>
Wed, 11 Jan 2006 16:13:25 +0000 (16:13 +0000)
committerFlorian Fainelli <florian@openwrt.org>
Wed, 11 Jan 2006 16:13:25 +0000 (16:13 +0000)
SVN-Revision: 2912

openwrt/package/base-files/default/etc/hotplug.d/net/10-net
openwrt/target/linux/package/base-files/files/brcm-2.6/etc/init.d/S05netconfig

index 187b937c6080e322e5a208b9ad923647b31a4e2a..b63eba090b12c12299f16d8c6868cf5fc745db22 100644 (file)
@@ -1,6 +1,9 @@
 #!/bin/sh
 setup_eth()
 {
+       for part in $(nvram get unused_ifnames); do
+               [ "$part" = "$INTERFACE" ] && return 0
+       done
        [ -f /proc/net/wl0 ] && {
                lsmod | grep wlcompat >&- || insmod wlcompat
        }
index 27336e112ea189a418a1d711d5d534e25102fbc1..3c4c032563f6955e0bae374fab5ab07d0534417d 100755 (executable)
@@ -57,7 +57,7 @@ END {
        # WAP54G
        if ((nvram["boardnum"] == "2") || \
                (nvram["boardnum"] == "1024")) {
-               c["lan_ifnames"]="eth0 eth1"
+               c["lan_ifnames"]="eth1 eth2"
                c["wan_ifname"]=""
        }
 
@@ -78,6 +78,7 @@ END {
        print "# lan_gateway=\"192.168.1.1\""
 
        print ""
+       p("unused_ifnames")
        print ""
 
        print "#### WAN configuration"