luci-app-mwan3: add command to diag_command output view

Add executed command to diagnostic output.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
This commit is contained in:
Florian Eckert 2018-06-22 08:51:27 +02:00
parent b93d3f3a18
commit 8d0cccdb43

View file

@ -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