adblock: bugfix 2.1.2 3887/head
authorDirk Brenken <dev@brenken.org>
Fri, 20 Jan 2017 08:57:33 +0000 (09:57 +0100)
committerDirk Brenken <dev@brenken.org>
Fri, 20 Jan 2017 08:57:33 +0000 (09:57 +0100)
* fix minor build error in init script

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

index 20b141931d5ecad43707f6f9c159ab05ef5d01d4..a94da66443e8e38e03eacec76d0a3d34412644d9 100644 (file)
@@ -6,7 +6,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=adblock
-PKG_VERSION:=2.1.1
+PKG_VERSION:=2.1.2
 PKG_RELEASE:=1
 PKG_LICENSE:=GPL-3.0+
 PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org>
index 354c7d9692a7cc9a503eb631408cffe4eb08aeca..da6d9a1194691af0138846f8e0603fd032157989 100755 (executable)
@@ -9,9 +9,7 @@ EXTRA_HELP="    suspend Suspend adblock processing
        resume  Resume adblock processing
        query   <DOMAIN> Query active blocklists for specific domain"
 
-exec 2>/dev/null
 adb_script="/usr/bin/adblock.sh"
-adb_iface="$(uci -q get adblock.global.adb_iface)"
 
 boot()
 {
@@ -74,16 +72,17 @@ query()
 
 service_triggers()
 {
-    local iface
+    local iface="$(uci -q get adblock.global.adb_iface)"
 
-    procd_add_config_trigger "config.change" "adblock" /etc/init.d/adblock start
-    if [ -z "${adb_iface}" ]
+    if [ -z "${iface}" ]
     then
         procd_add_raw_trigger "interface.*.up" 1000 /etc/init.d/adblock start
     else
-        for iface in ${adb_iface}
+        for name in ${iface}
         do
-            procd_add_interface_trigger "interface.*.up" "${iface}" /etc/init.d/adblock start
+            procd_add_interface_trigger "interface.*.up" "${name}" /etc/init.d/adblock start
         done
     fi
+
+    procd_add_config_trigger "config.change" "adblock" /etc/init.d/adblock start
 }
index 771857fc06c2ac507df76acf1011229ce394b72a..2573400cd66448993f3a1ed33609e65035a24858 100755 (executable)
@@ -10,7 +10,7 @@
 #
 LC_ALL=C
 PATH="/usr/sbin:/usr/bin:/sbin:/bin"
-adb_ver="2.1.1"
+adb_ver="2.1.2"
 adb_enabled=1
 adb_debug=0
 adb_whitelist="/etc/adblock/adblock.whitelist"
@@ -295,6 +295,7 @@ f_log()
 }
 
 # f_debug: gather memory & space information
+#
 f_debug()
 {
         local mem_total=0 mem_free=0 mem_swap=0 tmp_space=0 backup_space=0