aboutsummaryrefslogtreecommitdiffstats
path: root/package/dnsmasq/files
diff options
context:
space:
mode:
authorTravis Kemen <thepeople@openwrt.org>2007-11-28 03:02:20 +0000
committerTravis Kemen <thepeople@openwrt.org>2007-11-28 03:02:20 +0000
commit34ade10d04b16482762ecdf13f20d2d39054c6c3 (patch)
tree6392ca15bf935bb00dda35bb123c8b98090909f6 /package/dnsmasq/files
parent1c45a560a22a6a141504fe1fa5de9f9107831b0d (diff)
downloadupstream-34ade10d04b16482762ecdf13f20d2d39054c6c3.tar.gz
upstream-34ade10d04b16482762ecdf13f20d2d39054c6c3.tar.bz2
upstream-34ade10d04b16482762ecdf13f20d2d39054c6c3.zip
add option to turn off dynamic dhcp closes #2694
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@9608 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/dnsmasq/files')
-rw-r--r--package/dnsmasq/files/dnsmasq.init2
1 files changed, 2 insertions, 0 deletions
diff --git a/package/dnsmasq/files/dnsmasq.init b/package/dnsmasq/files/dnsmasq.init
index 75b20df0eb..69f499a7dc 100644
--- a/package/dnsmasq/files/dnsmasq.init
+++ b/package/dnsmasq/files/dnsmasq.init
@@ -200,11 +200,13 @@ dhcp_add() {
config_get limit "$cfg" limit
config_get leasetime "$cfg" leasetime
config_get options "$cfg" options
+ config_get_bool dynamicdhcp "$cfg" dynamicdhcp 1
leasetime="${leasetime:-12h}"
start="$(dhcp_calc "${start:-100}")"
limit="$((${limit:-150} + 1))"
eval "$(ipcalc.sh $ipaddr $netmask $start $limit)"
+ if [ "$dynamicdhcp" = "0" ]; then END="static"; fi
append args "--dhcp-range=$name,$START,$END,$NETMASK,$leasetime${options:+ $options}"
dhcp_option_add "$cfg" "$name"