From 7cfd8bc44e0f3b7b06c2c35167598cc613c5fd92 Mon Sep 17 00:00:00 2001 From: Dirk Brenken Date: Wed, 29 Jun 2016 23:39:12 +0200 Subject: [PATCH] adblock: update 1.3.1 * fix uclient-fetch detection * cosmetics Signed-off-by: Dirk Brenken --- net/adblock/Makefile | 2 +- net/adblock/files/adblock-helper.sh | 12 ++++++++---- net/adblock/files/adblock-update.sh | 6 +++--- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/net/adblock/Makefile b/net/adblock/Makefile index 5e4c23a67..dd4e69a17 100644 --- a/net/adblock/Makefile +++ b/net/adblock/Makefile @@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=adblock -PKG_VERSION:=1.3.0 +PKG_VERSION:=1.3.1 PKG_RELEASE:=1 PKG_LICENSE:=GPL-3.0+ PKG_MAINTAINER:=Dirk Brenken diff --git a/net/adblock/files/adblock-helper.sh b/net/adblock/files/adblock-helper.sh index 5814e85f3..ca8dafe11 100644 --- a/net/adblock/files/adblock-helper.sh +++ b/net/adblock/files/adblock-helper.sh @@ -52,7 +52,7 @@ f_envload() # check opkg availability # - if [ -r "/var/lock/opkg.lock" ] + if [ -f "/var/lock/opkg.lock" ] then rc=-10 f_log "adblock installation finished successfully, 'opkg' currently locked by package installer" @@ -246,9 +246,13 @@ f_envcheck() f_depend "libustream-polarssl" "true" if [ "${package_ok}" = "false" ] then - adb_fetch="$(which uclient-fetch)" - fetch_parm="-q --timeout=${adb_fetchttl}" - response_parm="--spider" + f_depend "libustream-\(mbedtls\|openssl\|cyassl\)" "true" + if [ "${package_ok}" = "true" ] + then + adb_fetch="$(which uclient-fetch)" + fetch_parm="-q --timeout=${adb_fetchttl}" + response_parm="--spider" + fi fi fi if [ -z "${adb_fetch}" ] diff --git a/net/adblock/files/adblock-update.sh b/net/adblock/files/adblock-update.sh index 2dc8dbfd8..f401301d6 100755 --- a/net/adblock/files/adblock-update.sh +++ b/net/adblock/files/adblock-update.sh @@ -10,7 +10,7 @@ # adb_pid="${$}" adb_pidfile="/var/run/adblock.pid" -adb_scriptver="1.3.0" +adb_scriptver="1.3.1" adb_mincfgver="2.2" adb_scriptdir="${0%/*}" if [ -r "${adb_pidfile}" ] @@ -227,7 +227,7 @@ then # generate a unique overall block list # - sort -u "${adb_dnsdir}/${adb_dnsprefix}."* > "${adb_tmpdir}/blocklist.overall" + sort -u "${adb_dnsdir}/${adb_dnsprefix}"* > "${adb_tmpdir}/blocklist.overall" # loop through all separate lists, ordered by size (ascending) # @@ -250,7 +250,7 @@ fi # restart & check dnsmasq with newly generated set of block lists # -if [ -n "${adb_revsrclist}" ] || [ "${rm_done}" = "true" ] +if [ -n "${adb_revsrclist}" ] || [ -n "${mv_done}" ] || [ "${rm_done}" = "true" ] then "${adb_uci}" -q delete "adblock.global.adb_dnstoggle" /etc/init.d/dnsmasq restart