summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-pbr/root/usr
diff options
context:
space:
mode:
authorStan Grishin <stangri@melmac.ca>2023-05-11 17:04:57 -0600
committerGitHub <noreply@github.com>2023-05-11 17:04:57 -0600
commita97ff279ceb7e15c3278a1db7e062ba35352c1f6 (patch)
tree1f27f359febdaf99ddb85ef1f5d0818202e0e166 /applications/luci-app-pbr/root/usr
parent2c66a37547e0cde125bdc0104c43672f26dbfcd2 (diff)
parentf45a91013c85e8e0b21f9ba0f2f507b034152aab (diff)
Merge pull request #6383 from stangri/master-luci-app-pbr
luci-app-pbr: opkg_get_version bugfix
Diffstat (limited to 'applications/luci-app-pbr/root/usr')
-rwxr-xr-xapplications/luci-app-pbr/root/usr/libexec/rpcd/luci.pbr4
1 files changed, 2 insertions, 2 deletions
diff --git a/applications/luci-app-pbr/root/usr/libexec/rpcd/luci.pbr b/applications/luci-app-pbr/root/usr/libexec/rpcd/luci.pbr
index 630bddf59c..57af8010f0 100755
--- a/applications/luci-app-pbr/root/usr/libexec/rpcd/luci.pbr
+++ b/applications/luci-app-pbr/root/usr/libexec/rpcd/luci.pbr
@@ -36,7 +36,7 @@ ubus_get_status() { ubus call service list "{ 'name': '$packageName' }" | jsonfi
ubus_get_gateway() { ubus call service list "{ 'name': '$packageName' }" | jsonfilter -e "@['${packageName}'].instances.main.data.gateways[@.name='${1}']${2:+.$2}"; }
is_greater() { test "$(printf '%s\n' "$@" | sort -V | head -n 1)" != "$1"; }
is_greater_or_equal() { test "$(printf '%s\n' "$@" | sort -V | head -n 1)" = "$2"; }
-opkg_get_version() { grep -m1 -A1 "$1" '/usr/lib/opkg/status' | grep -m1 'Version: ' | sed 's|Version: \(.*\)|\1|'; }
+opkg_get_version() { grep -m1 -A1 "Package: $1$" '/usr/lib/opkg/status' | grep -m1 'Version: ' | sed 's|Version: \(.*\)|\1|'; }
get_init_list() {
local name
@@ -242,7 +242,7 @@ get_gateways() {
echo -en "}}"
}
-str_contains() { [ -n "$1" ] &&[ -n "$2" ] && [ "${1//$2}" != "$1" ]; }
+str_contains() { [ -n "$1" ] && [ -n "$2" ] && [ "${1//$2}" != "$1" ]; }
str_contains_word() { echo "$1" | grep -q -w "$2"; }
str_to_lower() { echo "$1" | tr 'A-Z' 'a-z'; }
str_to_upper() { echo "$1" | tr 'a-z' 'A-Z'; }