summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-package-manager/root
diff options
context:
space:
mode:
authorHannu Nyman <hannu.nyman@iki.fi>2024-11-03 16:19:15 +0200
committerHannu Nyman <hannu.nyman@iki.fi>2024-11-03 22:06:22 +0200
commitd90728d2c05da46fe5c2a1a1100a93f9a55730d7 (patch)
tree969fa19f56e8eb593ab6ad19794ceebc6f6e22f3 /applications/luci-app-package-manager/root
parent5c27cf3671d298290a0e6a27936250e971eeb650 (diff)
luci-app-package-manager: Show the executed command
Clarify the output of the LuCI package manager actions: show also the exact command passed to apk & opkg (in addition to output & errors from the command) Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
Diffstat (limited to 'applications/luci-app-package-manager/root')
-rwxr-xr-xapplications/luci-app-package-manager/root/usr/libexec/package-manager-call2
1 files changed, 2 insertions, 0 deletions
diff --git a/applications/luci-app-package-manager/root/usr/libexec/package-manager-call b/applications/luci-app-package-manager/root/usr/libexec/package-manager-call
index 7667b8e8ce..0fe6efd16b 100755
--- a/applications/luci-app-package-manager/root/usr/libexec/package-manager-call
+++ b/applications/luci-app-package-manager/root/usr/libexec/package-manager-call
@@ -88,6 +88,7 @@ case "$action" in
fi
if flock -x 200; then
+ pkmcmd="$cmd $action $@"
$cmd $action "$@" </dev/null >/tmp/ipkg.out 2>/tmp/ipkg.err
code=$?
stdout=$(cat /tmp/ipkg.out)
@@ -99,6 +100,7 @@ case "$action" in
json_init
json_add_int code $code
+ [ -n "$pkmcmd" ] && json_add_string pkmcmd "$pkmcmd"
[ -n "$stdout" ] && json_add_string stdout "$stdout"
[ -n "$stderr" ] && json_add_string stderr "$stderr"
json_dump