adblock: update 4.4.5-2

* fixed f_uci function
* fixed f_switch function, reported in the turris forum

Signed-off-by: Dirk Brenken <dev@brenken.org>
(cherry picked from commit afce31650c)
This commit is contained in:
Dirk Brenken
2025-12-15 22:58:34 +01:00
parent f3a0387ac7
commit 11068c4abf
2 changed files with 5 additions and 5 deletions

View File

@@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=adblock PKG_NAME:=adblock
PKG_VERSION:=4.4.5 PKG_VERSION:=4.4.5
PKG_RELEASE:=1 PKG_RELEASE:=2
PKG_LICENSE:=GPL-3.0-or-later PKG_LICENSE:=GPL-3.0-or-later
PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org> PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org>

View File

@@ -531,7 +531,7 @@ f_rmdns() {
f_uci() { f_uci() {
local config="${1}" local config="${1}"
if [ -n "${config}" ]; then if [ -n "$(uci -q changes "${config}")" ]; then
uci_commit "${config}" uci_commit "${config}"
case "${config}" in case "${config}" in
"firewall") "firewall")
@@ -1027,11 +1027,11 @@ f_switch() {
elif [ "${status}" = "paused" ] && [ "${mode}" = "resume" ]; then elif [ "${status}" = "paused" ] && [ "${mode}" = "resume" ]; then
if [ "${adb_dnsshift}" = "0" ] && [ -f "${adb_backupdir}/${adb_dnsfile}" ]; then if [ "${adb_dnsshift}" = "0" ] && [ -f "${adb_backupdir}/${adb_dnsfile}" ]; then
mv -f "${adb_backupdir}/${adb_dnsfile}" "${adb_finaldir}/${adb_dnsfile}" mv -f "${adb_backupdir}/${adb_dnsfile}" "${adb_finaldir}/${adb_dnsfile}"
f_count "switch" "${adb_finaldir}/${adb_dnsfile}" f_count "final" "${adb_finaldir}/${adb_dnsfile}"
done="true" done="true"
elif [ "${adb_dnsshift}" = "1" ] && [ ! -L "${adb_finaldir}/${adb_dnsfile}" ]; then elif [ "${adb_dnsshift}" = "1" ] && [ ! -L "${adb_finaldir}/${adb_dnsfile}" ]; then
ln -fs "${adb_finaldir}/${adb_dnsfile}" "${adb_dnsdir}/${adb_dnsfile}" ln -fs "${adb_finaldir}/${adb_dnsfile}" "${adb_dnsdir}/${adb_dnsfile}"
f_count "switch" "${adb_finaldir}/${adb_dnsfile}" f_count "final" "${adb_finaldir}/${adb_dnsfile}"
done="true" done="true"
fi fi
fi fi
@@ -1040,7 +1040,7 @@ f_switch() {
f_jsnup "${mode}" f_jsnup "${mode}"
f_log "info" "${mode} adblock service" f_log "info" "${mode} adblock service"
else else
f_count "switch" "${adb_finaldir}/${adb_dnsfile}" f_count "final" "${adb_finaldir}/${adb_dnsfile}"
f_jsnup "${status}" f_jsnup "${status}"
fi fi
f_rmtemp f_rmtemp