pbr: detect missing iptables

Signed-off-by: Stan Grishin <stangri@melmac.ca>
This commit is contained in:
Stan Grishin 2022-12-12 02:52:59 +00:00
parent f558461895
commit a86985879f
2 changed files with 8 additions and 1 deletions

View File

@ -5,7 +5,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=pbr
PKG_VERSION:=1.0.0
PKG_RELEASE:=1
PKG_RELEASE:=2
PKG_LICENSE:=GPL-3.0-or-later
PKG_MAINTAINER:=Stan Grishin <stangri@melmac.ca>

View File

@ -109,6 +109,7 @@ get_text() {
case "$1" in
errorConfigValidation) r="Config ($packageConfigFile) validation failure!";;
errorNoIpFull) r="ip-full binary cannot be found!";;
errorNoIptables) r="iptables binary cannot be found!";;
errorNoIpset) r="Resolver set support (${resolver_set}) requires ipset, but ipset binary cannot be found!";;
errorNoNft) r="Resolver set support (${resolver_set}) requires nftables, but nft binary cannot be found!";;
errorResolverNotSupported) r="Resolver set (${resolver_set}) is not supported on this system!";;
@ -336,6 +337,12 @@ load_environment() {
state add 'errorSummary' 'errorNoIpFull'
return 1
fi
if ! is_nft; then
if [ -z "$iptables" ] || [ ! -x "$iptables" ]; then
state add 'errorSummary' 'errorNoIptables'
return 1
fi
fi
resolver 'check_support'
fi