self-diagnostics: Fix rpcd scripts

This commit is contained in:
Vivek Kumar Dutta 2024-09-12 18:53:11 +05:30
parent 2e8a62001e
commit 5f255090f5
2 changed files with 15 additions and 4 deletions

View file

@ -1,7 +1,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=self-diagnostics
PKG_VERSION:=1.0.8
PKG_VERSION:=1.0.9
PKG_RELEASE:=1
PKG_LICENSE:=GPL-2.0-only

View file

@ -11,17 +11,28 @@ case "$1" in
case "$2" in
generate)
read -t 1 -r input
local out
json_load "${input}"
json_get_var modules modules
if [ -z "${modules}" ]; then
${BIN} -j
out="$(${BIN} -j)"
else
${BIN} -j -m "${modules}"
out="$(${BIN} -j -m "${modules}")"
fi
if [ -z "${out}" ]; then
echo '{}'
else
echo "${out}"
fi
;;
list)
${BIN} -j -l
out="$(${BIN} -j -l)"
if [ -z "${out}" ]; then
echo '{}'
else
echo "${out}"
fi
;;
esac
;;