}
end
- for _, device in ipairs(net:get_interfaces()) do
+ for _, device in ipairs(net:get_interfaces() or {}) do
data.subdevices[#data.subdevices+1] = {
name = device:shortname(),
type = device:type(),
local net = netmd:get_network(iface)
if net then
- local ifn
- for _, ifn in ipairs(net:get_interfaces()) do
- local wnet = ifn:get_wifinet()
- if wnet then
- local wdev = wnet:get_device()
- if wdev then
- luci.sys.call(
- "env -i /sbin/wifi up %q >/dev/null 2>/dev/null"
- % wdev:name()
- )
-
- luci.http.status(200, "Reconnected")
- return
- end
- end
- end
-
luci.sys.call("env -i /sbin/ifup %q >/dev/null 2>/dev/null" % iface)
luci.http.status(200, "Reconnected")
return