diff options
author | Hauke Mehrtens <hauke@hauke-m.de> | 2016-04-17 12:52:54 +0000 |
---|---|---|
committer | Hauke Mehrtens <hauke@hauke-m.de> | 2016-04-17 12:52:54 +0000 |
commit | 3fabbb814d36ec9cbf484c1b0df82f5a06869aec (patch) | |
tree | d5be51d92564f9c4e8bcc3fb9c26a7c8ca5dabcb /package/network | |
parent | 5a5657cda118b8d98577da39715943beb995dd9f (diff) | |
download | mtk-20170518-3fabbb814d36ec9cbf484c1b0df82f5a06869aec.zip mtk-20170518-3fabbb814d36ec9cbf484c1b0df82f5a06869aec.tar.gz mtk-20170518-3fabbb814d36ec9cbf484c1b0df82f5a06869aec.tar.bz2 |
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
Diffstat (limited to 'package/network')
-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 61ded6a..0cda02d 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 |