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 <dedeckeh@gmail.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>

SVN-Revision: 49187
Hauke Mehrtens 2016-04-17 12:52:54 +00:00
parent 5a5657cda1
commit 3fabbb814d
1 changed files with 3 additions and 0 deletions

View File

@ -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