From c353ed253c2bbb0eeeebd3a385778028ea2d1ab3 Mon Sep 17 00:00:00 2001 From: Dirk Brenken Date: Fri, 19 Feb 2016 13:59:40 +0100 Subject: [PATCH] adblock: 0.70.2 * fix wan update detection failure Signed-off-by: Dirk Brenken --- net/adblock/Makefile | 2 +- net/adblock/files/adblock-helper.sh | 9 +++++++-- net/adblock/files/adblock-update.sh | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/net/adblock/Makefile b/net/adblock/Makefile index b0c8f5e58..e02136cf8 100644 --- a/net/adblock/Makefile +++ b/net/adblock/Makefile @@ -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 diff --git a/net/adblock/files/adblock-helper.sh b/net/adblock/files/adblock-helper.sh index 578e2fceb..8983a99c9 100644 --- a/net/adblock/files/adblock-helper.sh +++ b/net/adblock/files/adblock-helper.sh @@ -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 diff --git a/net/adblock/files/adblock-update.sh b/net/adblock/files/adblock-update.sh index b23d82d15..82e56f958 100755 --- a/net/adblock/files/adblock-update.sh +++ b/net/adblock/files/adblock-update.sh @@ -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