adblock: 0.70.2 2396/head
authorDirk Brenken <dirk@brenken.org>
Fri, 19 Feb 2016 12:59:40 +0000 (13:59 +0100)
committerDirk Brenken <dirk@brenken.org>
Fri, 19 Feb 2016 13:04:32 +0000 (14:04 +0100)
* fix wan update detection failure

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

index b0c8f5e58f70e74d7c3712262df17b5b5c494952..e02136cf82614416b419dd8df9104ca96483d4ad 100644 (file)
@@ -7,7 +7,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=adblock
-PKG_VERSION:=0.70.1
+PKG_VERSION:=0.70.2
 PKG_RELEASE:=1
 PKG_LICENSE:=GPL-3.0+
 PKG_MAINTAINER:=Dirk Brenken <openwrt@brenken.org>
index 578e2fceb29d765e7c8a983af4dd25c75e0f69b6..8983a99c9d5b0d07e0a13eb930f892c02549328a 100644 (file)
@@ -472,8 +472,13 @@ f_envcheck()
                     f_restore
                 fi
             fi
-            check="$(cat /sys/class/net/${adb_wandev}/operstate 2>/dev/null)"
-            if [ "${check}" = "up" ]
+            if [ -n "${adb_wandev4}" ]
+            then
+                rc="$(/bin/ping -c1 -W1 8.8.8.8 -I ${adb_wandev} >/dev/null 2>&1; printf $?)"
+            else
+                rc="$(/bin/ping -6 -c1 -W1 2001:4860:4860::8888 -I ${adb_wandev} >/dev/null 2>&1; printf $?)"
+            fi
+            if [ $((rc)) -eq 0  ]
             then
                 f_log "get active wan update interface/device (${adb_wanif}/${adb_wandev})"
                 break 2
index b23d82d1513d6b366e8d0c59c713d4ceb45c7298..82e56f9589e34aa6942b5b207e8a4f0ef3ac88c9 100755 (executable)
@@ -45,7 +45,7 @@ fi
 # get current directory, script- and openwrt version
 #
 adb_scriptdir="${0%/*}"
-adb_scriptver="0.70.1"
+adb_scriptver="0.70.2"
 openwrt_version="$(cat /etc/openwrt_version 2>/dev/null)"
 
 # source in adblock function library