diff options
author | Hauke Mehrtens <hauke@openwrt.org> | 2016-04-17 12:52:54 +0000 |
---|---|---|
committer | Hauke Mehrtens <hauke@openwrt.org> | 2016-04-17 12:52:54 +0000 |
commit | 93da434bd8052cf16622a33bcdd27c9edc5ae79f (patch) | |
tree | 6b665e763e16805745abf46e5335a976b43efb4c /package/network/services | |
parent | 08c21d61e7fdfff7330626098eb84b5f06d7fd2c (diff) | |
download | master-187ad058-93da434bd8052cf16622a33bcdd27c9edc5ae79f.tar.gz master-187ad058-93da434bd8052cf16622a33bcdd27c9edc5ae79f.tar.bz2 master-187ad058-93da434bd8052cf16622a33bcdd27c9edc5ae79f.zip |
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>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@49187 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/network/services')
-rw-r--r-- | package/network/services/dnsmasq/files/dnsmasq.init | 3 |
1 files changed, 3 insertions, 0 deletions
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 |