remove memleak patch because of issues with premature freeing of memory - i will...
[openwrt.git] / package / dnsmasq / files / dnsmasq.init
index 75b20df..776dadd 100644 (file)
@@ -23,7 +23,7 @@ append_bool() {
        local value="$3"
        local _loctmp
        config_get_bool _loctmp "$section" "$option"
-       [ "$_loctmp" -gt 0 ] && append args "$3"
+       [ "$_loctmp" -gt 0 ] && append args "$value"
 }
 
 append_parm() {
@@ -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"
This page took 0.023871 seconds and 4 git commands to generate.