mirror of
https://github.com/openwrt/packages.git
synced 2025-12-21 21:24:31 +04:00
adblock-fast: bugfixes: status & TLD check with unbound
fixes: https://github.com/openwrt/packages/issues/27146 supercedes: https://github.com/openwrt/packages/pull/27159 Signed-off-by: Stan Grishin <stangri@melmac.ca>
This commit is contained in:
@@ -5,7 +5,7 @@ include $(TOPDIR)/rules.mk
|
|||||||
|
|
||||||
PKG_NAME:=adblock-fast
|
PKG_NAME:=adblock-fast
|
||||||
PKG_VERSION:=1.1.4
|
PKG_VERSION:=1.1.4
|
||||||
PKG_RELEASE:=4
|
PKG_RELEASE:=5
|
||||||
PKG_MAINTAINER:=Stan Grishin <stangri@melmac.ca>
|
PKG_MAINTAINER:=Stan Grishin <stangri@melmac.ca>
|
||||||
PKG_LICENSE:=AGPL-3.0-or-later
|
PKG_LICENSE:=AGPL-3.0-or-later
|
||||||
|
|
||||||
|
|||||||
@@ -459,7 +459,7 @@ json() {
|
|||||||
'get')
|
'get')
|
||||||
case "$param" in
|
case "$param" in
|
||||||
'errors'|'warnings')
|
'errors'|'warnings')
|
||||||
json_select "$param" >/dev/null 2>&1
|
json_select "$param" >/dev/null 2>&1 || return
|
||||||
if [ -z "$value" ]; then
|
if [ -z "$value" ]; then
|
||||||
json_get_keys i
|
json_get_keys i
|
||||||
else
|
else
|
||||||
@@ -1140,7 +1140,7 @@ resolver() {
|
|||||||
sanity)
|
sanity)
|
||||||
[ -n "$sanity_check" ] || return 0
|
[ -n "$sanity_check" ] || return 0
|
||||||
output_dns "Sanity check for $dns TLDs "
|
output_dns "Sanity check for $dns TLDs "
|
||||||
if ! grep -q -v '\.' "$outputFile"; then
|
if ! grep -qvE '\.|server:' "$outputFile"; then
|
||||||
output_ok
|
output_ok
|
||||||
else
|
else
|
||||||
json add warning 'warningSanityCheckTLD' "$outputFile"
|
json add warning 'warningSanityCheckTLD' "$outputFile"
|
||||||
@@ -1985,7 +1985,7 @@ adb_check_tld() {
|
|||||||
output "No block-list ('$outputFile') found.\n"
|
output "No block-list ('$outputFile') found.\n"
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
c="$(grep -c -v '\.' "$outputFile")"
|
c="$(grep -cvE '\.|server:' "$outputFile")"
|
||||||
if [ "$c" -gt 0 ]; then
|
if [ "$c" -gt 0 ]; then
|
||||||
if [ "$c" -eq 1 ]; then
|
if [ "$c" -eq 1 ]; then
|
||||||
output 1 "Found 1 match for TLD in '$outputFile'.\n"
|
output 1 "Found 1 match for TLD in '$outputFile'.\n"
|
||||||
@@ -1995,7 +1995,7 @@ adb_check_tld() {
|
|||||||
output 2 "[PROC] Found $c matches for TLDs in '$outputFile'.\n"
|
output 2 "[PROC] Found $c matches for TLDs in '$outputFile'.\n"
|
||||||
fi
|
fi
|
||||||
if [ "$c" -le 20 ]; then
|
if [ "$c" -le 20 ]; then
|
||||||
grep -v '\.' "$outputFile" | sed "$outputOutputFilter"
|
grep -vE '\.|server:' "$outputFile" | sed "$outputOutputFilter"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
output 1 "No TLD was found in current block-list ('$outputFile').\n"
|
output 1 "No TLD was found in current block-list ('$outputFile').\n"
|
||||||
|
|||||||
Reference in New Issue
Block a user