%+header%> <% local cnt = 1 local tt = {} tt[0] = "********************************************************************************************************" os.execute("cat /sys/kernel/debug/usb/devices > /tmp/modstat 2>&1") local file = io.open("/tmp/modstat", "r") repeat local line = file:read("*line") if line == nil then break end if string.len(line) < 3 then line = "********************************************************************************************************" end tt[cnt] = line cnt = cnt + 1 until 1 == 0 cnt = cnt - 1 file:close() os.execute("/usr/lib/rooter/luci/luaops.sh delete /tmp/modstat") pci = 0 file = io.open("/usr/lib/rooter/mhi/create-pci.sh", "r") if file ~= nil then os.execute("lspci -vD > /tmp/modstat 2>&1") pcnt = 1 ptt = {} ptt[0] = "********************************************************************************************************" file = io.open("/tmp/modstat", "r") repeat local line = file:read("*line") if line == nil then break end if string.len(line) < 3 then line = "********************************************************************************************************" end if not string.find(line, "lspci: Unable") then ptt[pcnt] = line pcnt = pcnt + 1 end until 1 == 0 pcnt = pcnt - 1 file:close() pci = 1 end %>
<%+footer%>