aboutsummaryrefslogtreecommitdiffstats
path: root/package/dnsmasq
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2006-07-30 03:18:50 +0000
committerFelix Fietkau <nbd@openwrt.org>2006-07-30 03:18:50 +0000
commitac22df585160d1977870617613843441a792f305 (patch)
tree42080aef9907d62238a8b48143a70ef8aabe8993 /package/dnsmasq
parentd3a6fe9915875cb78ca3d22f8330a0380dcd58a0 (diff)
downloadupstream-ac22df585160d1977870617613843441a792f305.tar.gz
upstream-ac22df585160d1977870617613843441a792f305.tar.bz2
upstream-ac22df585160d1977870617613843441a792f305.zip
only set dhcp_enable if lan proto is set to static
git-svn-id: svn://svn.openwrt.org/openwrt/branches/buildroot-ng/openwrt@4324 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/dnsmasq')
-rw-r--r--package/dnsmasq/files/dnsmasq.init5
1 files changed, 3 insertions, 2 deletions
diff --git a/package/dnsmasq/files/dnsmasq.init b/package/dnsmasq/files/dnsmasq.init
index 140f727f46..14fc698cff 100644
--- a/package/dnsmasq/files/dnsmasq.init
+++ b/package/dnsmasq/files/dnsmasq.init
@@ -13,8 +13,9 @@ scan_interfaces
args=""
iface=lan
config_get ifname "$iface" ifname
+config_get proto "$iface" proto
-dhcp_enable="${dhcp_enable:-1}"
+[ "$proto" = static ] && dhcp_enable="${dhcp_enable:-1}"
dhcp_start="${dhcp_start:-100}"
dhcp_num="${dhcp_num:-50}"
dhcp_lease="${dhcp_lease:-12h}"
@@ -33,7 +34,7 @@ dhcp_lease="${dhcp_lease:-12h}"
eval $(ipcalc $ipaddr $netmask ${dhcp_start:-100} ${dhcp_num:-150})
# and pass the args via config parser defines
- echo "@define dhcp_enable 1"
+ echo "${dhcp_enable:+@define dhcp_enable 1}"
echo "@define netmask $NETMASK"
echo "@define start $START"
echo "@define end $END"