aboutsummaryrefslogtreecommitdiffstats
path: root/package/network/services
diff options
context:
space:
mode:
authorYousong Zhou <yszhou4tech@gmail.com>2019-06-11 08:26:27 +0000
committerYousong Zhou <yszhou4tech@gmail.com>2019-06-11 08:32:54 +0000
commit04b45d3a31fac45c472ad3c31d98268d1c309763 (patch)
treeb848698f6ed946d960af2677815e3211cbc67bb4 /package/network/services
parentf5387b754f98f85bf4a1c8c392a965bdbcb96db6 (diff)
downloadupstream-04b45d3a31fac45c472ad3c31d98268d1c309763.tar.gz
upstream-04b45d3a31fac45c472ad3c31d98268d1c309763.tar.bz2
upstream-04b45d3a31fac45c472ad3c31d98268d1c309763.zip
dnsmasq: move feature detection inside a shell func
Resolves openwrt/packages#9219 Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
Diffstat (limited to 'package/network/services')
-rw-r--r--package/network/services/dnsmasq/Makefile2
-rw-r--r--package/network/services/dnsmasq/files/dnsmasq.init15
2 files changed, 10 insertions, 7 deletions
diff --git a/package/network/services/dnsmasq/Makefile b/package/network/services/dnsmasq/Makefile
index 419526bdd8..c04d96fff2 100644
--- a/package/network/services/dnsmasq/Makefile
+++ b/package/network/services/dnsmasq/Makefile
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=dnsmasq
PKG_UPSTREAM_VERSION:=2.80
PKG_VERSION:=$(subst test,~~test,$(subst rc,~rc,$(PKG_UPSTREAM_VERSION)))
-PKG_RELEASE:=12
+PKG_RELEASE:=13
PKG_SOURCE:=$(PKG_NAME)-$(PKG_UPSTREAM_VERSION).tar.xz
PKG_SOURCE_URL:=http://thekelleys.org.uk/dnsmasq
diff --git a/package/network/services/dnsmasq/files/dnsmasq.init b/package/network/services/dnsmasq/files/dnsmasq.init
index e19c56f6a9..1054f7a12a 100644
--- a/package/network/services/dnsmasq/files/dnsmasq.init
+++ b/package/network/services/dnsmasq/files/dnsmasq.init
@@ -22,15 +22,18 @@ DHCPSCRIPT="/usr/lib/dnsmasq/dhcp-script.sh"
DNSMASQ_DHCP_VER=4
-dnsmasq_features="$(dnsmasq --version | grep -m1 'Compile time options:' | cut -d: -f2) "
-[ "${dnsmasq_features#* DHCP }" = "$dnsmasq_features" ] || dnsmasq_has_dhcp=1
-[ "${dnsmasq_features#* DHCPv6 }" = "$dnsmasq_features" ] || dnsmasq_has_dhcp6=1
-[ "${dnsmasq_features#* DNSSEC }" = "$dnsmasq_features" ] || dnsmasq_has_dnssec=1
-[ "${dnsmasq_features#* TFTP }" = "$dnsmasq_features" ] || dnsmasq_has_tftp=1
-[ "${dnsmasq_features#* ipset }" = "$dnsmasq_features" ] || dnsmasq_has_ipset=1
dnsmasq_ignore_opt() {
local opt="$1"
+ if [ -z "$dnsmasq_features" ]; then
+ dnsmasq_features="$(dnsmasq --version | grep -m1 'Compile time options:' | cut -d: -f2) "
+ [ "${dnsmasq_features#* DHCP }" = "$dnsmasq_features" ] || dnsmasq_has_dhcp=1
+ [ "${dnsmasq_features#* DHCPv6 }" = "$dnsmasq_features" ] || dnsmasq_has_dhcp6=1
+ [ "${dnsmasq_features#* DNSSEC }" = "$dnsmasq_features" ] || dnsmasq_has_dnssec=1
+ [ "${dnsmasq_features#* TFTP }" = "$dnsmasq_features" ] || dnsmasq_has_tftp=1
+ [ "${dnsmasq_features#* ipset }" = "$dnsmasq_features" ] || dnsmasq_has_ipset=1
+ fi
+
case "$opt" in
dhcp-duid|\
ra-param)