* fix uclient-fetch detection
* cosmetics
Signed-off-by: Dirk Brenken <dev@brenken.org>
include $(TOPDIR)/rules.mk
PKG_NAME:=adblock
include $(TOPDIR)/rules.mk
PKG_NAME:=adblock
PKG_RELEASE:=1
PKG_LICENSE:=GPL-3.0+
PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org>
PKG_RELEASE:=1
PKG_LICENSE:=GPL-3.0+
PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org>
# check opkg availability
#
# 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"
then
rc=-10
f_log "adblock installation finished successfully, 'opkg' currently locked by package installer"
f_depend "libustream-polarssl" "true"
if [ "${package_ok}" = "false" ]
then
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}" ]
fi
fi
if [ -z "${adb_fetch}" ]
#
adb_pid="${$}"
adb_pidfile="/var/run/adblock.pid"
#
adb_pid="${$}"
adb_pidfile="/var/run/adblock.pid"
adb_mincfgver="2.2"
adb_scriptdir="${0%/*}"
if [ -r "${adb_pidfile}" ]
adb_mincfgver="2.2"
adb_scriptdir="${0%/*}"
if [ -r "${adb_pidfile}" ]
# generate a unique overall block list
#
# 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)
#
# loop through all separate lists, ordered by size (ascending)
#
# restart & check dnsmasq with newly generated set of block lists
#
# 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
then
"${adb_uci}" -q delete "adblock.global.adb_dnstoggle"
/etc/init.d/dnsmasq restart