adblock: update 1.3.1 2909/head
authorDirk Brenken <dev@brenken.org>
Wed, 29 Jun 2016 21:39:12 +0000 (23:39 +0200)
committerDirk Brenken <dev@brenken.org>
Wed, 29 Jun 2016 21:39:12 +0000 (23:39 +0200)
* fix uclient-fetch detection
* cosmetics

Signed-off-by: Dirk Brenken <dev@brenken.org>
net/adblock/Makefile
net/adblock/files/adblock-helper.sh
net/adblock/files/adblock-update.sh

index 5e4c23a676bcc7e0095037b5020068fc1f153409..dd4e69a1782e1414618cab929b10773e3cf70a55 100644 (file)
@@ -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 <dev@brenken.org>
index 5814e85f335229421722378d4518ada8c580ebce..ca8dafe1145ff08a50ee3de2c6b639b18cf6ce89 100644 (file)
@@ -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}" ]
index 2dc8dbfd8dc9fe948bebf59cda28dfa08427d3cc..f401301d614b6892b9265398a02bfed4547020ff 100755 (executable)
@@ -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