summaryrefslogtreecommitdiff
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
commitdf42216881696556c2dcadc63435cf14462c5fd1 (patch)
tree3f3e61c607ed54b578037c550270fd8f440244bb /package/dnsmasq/files
parentd36374c428c35478d0aba549325e93fef74d0898 (diff)
downloadmtk-20170518-df42216881696556c2dcadc63435cf14462c5fd1.zip
mtk-20170518-df42216881696556c2dcadc63435cf14462c5fd1.tar.gz
mtk-20170518-df42216881696556c2dcadc63435cf14462c5fd1.tar.bz2
add option to turn off dynamic dhcp closes #2694
SVN-Revision: 9608
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 75b20df..69f499a 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"