local dev = wnet:get_device()
local nets = wnet:get_networks()
if dev then
- luci.sys.call("env -i /sbin/wifi down %q >/dev/null" % dev:name())
ntm:del_wifinet(network)
ntm:commit("wireless")
local _, net
ntm:commit("network")
end
end
- luci.sys.call("env -i /sbin/wifi up %q >/dev/null" % dev:name())
+ luci.sys.call("env -i /bin/ubus call network reload >/dev/null 2>/dev/null")
end
end
local net = netmd:get_wifinet(wnet)
local dev = net:get_device()
if dev and net then
- luci.sys.call("env -i /sbin/wifi down >/dev/null 2>/dev/null")
-
dev:set("disabled", nil)
net:set("disabled", shutdown and 1 or nil)
netmd:commit("wireless")
- luci.sys.call("env -i /sbin/wifi up >/dev/null 2>/dev/null")
+ luci.sys.call("env -i /bin/ubus call network reload >/dev/null 2>/dev/null")
luci.http.status(200, shutdown and "Shutdown" or "Reconnected")
return