allow other values than 'dhcp' for *_proto so that you can work around the linksys...
authorFelix Fietkau <nbd@openwrt.org>
Wed, 23 Aug 2006 21:24:56 +0000 (21:24 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Wed, 23 Aug 2006 21:24:56 +0000 (21:24 +0000)
SVN-Revision: 4641

openwrt/package/base-files/default/etc/functions.sh
openwrt/package/base-files/default/etc/init.d/S05nvram

index 95550a236c16f208c2cec595f3c812af1c15b110..10c1496d837588ff1234fae28ccfcdb618b18dcd 100755 (executable)
@@ -69,7 +69,7 @@ do_ifup() {
                
                env -i ACTION="ifup" INTERFACE="${2}" PROTO=static /sbin/hotplug "iface" &
        ;;
-       dhcp)
+       dhcp*)
                DHCP_IP=$(nvram get ${2}_ipaddr)
                DHCP_NETMASK=$(nvram get ${2}_netmask)
                mtu=$(nvram get ${2}_mtu)
index e798e96252a4c11260d3f6450f8df30043b01bcd..67ed1f27d60137ec230d05bc854a8064eddac0b4 100755 (executable)
@@ -67,8 +67,8 @@ case "$(( $boardtype ))" in
 esac
 [ "$COMMIT" = "1" ] && nvram commit
 
-# linksys bug; remove when not using static configuration for lan
-nvram set lan_proto="static"
+# linksys bug; use 'dhcpclient' or similar as lan_proto if you want to use dhcp
+[ "$(nvram get lan_proto)" = "dhcp" ] && nvram set lan_proto="static"
 
 # hacks for wrt54g 1.x hardware
 [  "$boardnum"  = "42" \