From: hauke Date: Sun, 17 Apr 2016 12:52:54 +0000 (+0000) Subject: dnsmasq: Add enable parameter in the UCI DHCP host section X-Git-Url: http://207.154.207.93/?a=commitdiff_plain;h=856890037f22e0b316f135eb5c558e17abab5b1c;p=openwrt.git dnsmasq: Add enable parameter in the UCI DHCP host section Parameter allows to enable/disable static leases; by default the value is 1 to keep backwards compatibility Signed-off-by: Hans Dedecker Signed-off-by: Hauke Mehrtens git-svn-id: svn://svn.openwrt.org/openwrt/trunk@49187 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- diff --git a/package/network/services/dnsmasq/files/dnsmasq.init b/package/network/services/dnsmasq/files/dnsmasq.init index 61ded6a53a..0cda02d4fe 100644 --- a/package/network/services/dnsmasq/files/dnsmasq.init +++ b/package/network/services/dnsmasq/files/dnsmasq.init @@ -316,6 +316,9 @@ dhcp_host_add() { config_get networkid "$cfg" networkid [ -n "$networkid" ] && dhcp_option_add "$cfg" "$networkid" "$force" + config_get_bool enable "$cfg" enable 1 + [ "$enable" = "0" ] && return 0 + config_get name "$cfg" name config_get ip "$cfg" ip [ -n "$ip" -o -n "$name" ] || return 0