From: Florian Eckert Date: Fri, 22 Jun 2018 06:51:27 +0000 (+0200) Subject: luci-app-mwan3: add command to diag_command output view X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=8d0cccdb431e61b26a8482cb5a6ac81540b7d229;p=oweals%2Fluci.git luci-app-mwan3: add command to diag_command output view Add executed command to diagnostic output. Signed-off-by: Florian Eckert --- diff --git a/applications/luci-app-mwan3/luasrc/controller/mwan3.lua b/applications/luci-app-mwan3/luasrc/controller/mwan3.lua index 2d46953e5..541d695ec 100644 --- a/applications/luci-app-mwan3/luasrc/controller/mwan3.lua +++ b/applications/luci-app-mwan3/luasrc/controller/mwan3.lua @@ -101,6 +101,10 @@ function diagnosticsData(interface, task) if addr and addr:match("^[a-zA-Z0-9%-%.:_]+$") then local util = io.popen(cmd %{ut.shellquote(device), ut.shellquote(addr)}) if util then + luci.http.write("Command:\n") + luci.http.write(cmd %{ut.shellquote(device), + ut.shellquote(addr)} .. "\n\n") + luci.http.write("Result:\n") while true do local ln = util:read("*l") if not ln then break end