mirror of https://github.com/hak5/openwrt.git
dnsmasq: move feature detection inside a shell func
Resolves openwrt/packages#9219
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
(cherry picked from commit 04b45d3a31
)
openwrt-19.07
parent
b344ca9ca6
commit
c4e727f01c
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue