From 73c3628f5ae7b477ca7d6332fceda63ba2bf8123 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Wed, 23 Aug 2006 21:24:56 +0000 Subject: [PATCH] allow other values than 'dhcp' for *_proto so that you can work around the linksys lan_proto bug without changing scripts (#437) SVN-Revision: 4641 --- openwrt/package/base-files/default/etc/functions.sh | 2 +- openwrt/package/base-files/default/etc/init.d/S05nvram | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/openwrt/package/base-files/default/etc/functions.sh b/openwrt/package/base-files/default/etc/functions.sh index 95550a236c..10c1496d83 100755 --- a/openwrt/package/base-files/default/etc/functions.sh +++ b/openwrt/package/base-files/default/etc/functions.sh @@ -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) diff --git a/openwrt/package/base-files/default/etc/init.d/S05nvram b/openwrt/package/base-files/default/etc/init.d/S05nvram index e798e96252..67ed1f27d6 100755 --- a/openwrt/package/base-files/default/etc/init.d/S05nvram +++ b/openwrt/package/base-files/default/etc/init.d/S05nvram @@ -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" \ -- 2.30.2