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>
fs.exec_direct('/usr/libexec/package-manager-call', argv, 'json').then(function(res) {
dlg.removeChild(dlg.lastChild);
+ if (res.pkmcmd)
+ dlg.appendChild(E('pre', [ res.pkmcmd ]));
+
if (res.stdout)
dlg.appendChild(E('pre', [ res.stdout ]));
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)
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