From 8d0cccdb431e61b26a8482cb5a6ac81540b7d229 Mon Sep 17 00:00:00 2001 From: Florian Eckert Date: Fri, 22 Jun 2018 08:51:27 +0200 Subject: [PATCH] luci-app-mwan3: add command to diag_command output view Add executed command to diagnostic output. Signed-off-by: Florian Eckert --- applications/luci-app-mwan3/luasrc/controller/mwan3.lua | 4 ++++ 1 file changed, 4 insertions(+) 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 -- 2.25.1