dnsmasq: Add enable parameter in the UCI DHCP host section
authorHauke Mehrtens <hauke@hauke-m.de>
Sun, 17 Apr 2016 12:52:54 +0000 (12:52 +0000)
committerHauke Mehrtens <hauke@hauke-m.de>
Sun, 17 Apr 2016 12:52:54 +0000 (12:52 +0000)
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

package/network/services/dnsmasq/files/dnsmasq.init

index 61ded6a..0cda02d 100644 (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