Skip to content

Commit 23a2764

Browse files
committed
apk-related bugfixes
1 parent 5b1d982 commit 23a2764

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ include $(TOPDIR)/rules.mk
55

66
PKG_NAME:=adblock-fast
77
PKG_VERSION:=1.2.1
8-
PKG_RELEASE:=7
8+
PKG_RELEASE:=8
99
PKG_MAINTAINER:=Stan Grishin <stangri@melmac.ca>
1010
PKG_LICENSE:=AGPL-3.0-or-later
1111

files/etc/init.d/adblock-fast

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -433,8 +433,8 @@ is_fw4_restart_needed() {
433433
fi
434434
}
435435
is_integer() { case "$1" in ''|*[!0-9]*) return 1;; esac; [ "$1" -ge 1 ] && [ "$1" -le 65535 ] || return 1; return 0; }
436-
is_greater() { test "$(printf '%s\n' "$@" | sort -V | head -n 1)" != "$1"; }
437-
is_greater_or_equal() { test "$(printf '%s\n' "$@" | sort -V | head -n 1)" = "$2"; }
436+
is_greater() { test "$(printf '%s\n' "$@" | sort -V 2>/dev/null | head -n 1)" != "$1"; }
437+
is_greater_or_equal() { test "$(printf '%s\n' "$@" | sort -V 2>/dev/null | head -n 1)" = "$2"; }
438438
# shellcheck disable=SC3057
439439
is_https_url() { [ "${1:0:8}" = "https://" ]; }
440440
is_newline_ending() { [ "$(tail -c1 "$1" | wc -l)" -ne '0' ]; }
@@ -787,7 +787,7 @@ detect_file_type() {
787787
echo 'dnsmasq3'
788788
elif grep -q -e '^0\.0\.0\.0\s' -e '^127\.0\.0\.1\s' "$file"; then
789789
echo 'hosts'
790-
elif [ -n "$(sed "$domainsFilter" "$file" | head -1)" ]; then
790+
elif [ -n "$(sed "$domainsFilter" "$file" 2>/dev/null | head -1)" ]; then
791791
echo 'domains'
792792
fi
793793
}

files/etc/uci-defaults/90-adblock-fast

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ if [ -s '/etc/config/simple-adblock' ] \
126126
fi
127127

128128
# Transition to list names
129-
_find_name() { grep -B1 "$1" "/etc/config/${packageName}-opkg" | head -1 | cut -d "'" -f2; }
129+
_find_name() { grep -B1 "$1" "/etc/config/${packageName}-opkg" 2>/dev/null | head -1 | cut -d "'" -f2; }
130130

131131
add_name() {
132132
local cfg="$1"

0 commit comments

Comments
 (0)