summaryrefslogtreecommitdiffhomepage
path: root/modules/admin-full/luasrc
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2013-12-08 16:46:55 +0000
committerJo-Philipp Wich <jow@openwrt.org>2013-12-08 16:46:55 +0000
commita654b403660570258b447afc25ae6283936f8821 (patch)
tree3b78fad9f6cf07b10355ffa1781554065311f1b0 /modules/admin-full/luasrc
parent6f8881d48d713b320a5d71c6c7b9dd7af310f12d (diff)
modules/admin-full: use ubus call network reload after enabling, disabling or deleting wifi networks
Diffstat (limited to 'modules/admin-full/luasrc')
-rw-r--r--modules/admin-full/luasrc/controller/admin/network.lua7
1 files changed, 2 insertions, 5 deletions
diff --git a/modules/admin-full/luasrc/controller/admin/network.lua b/modules/admin-full/luasrc/controller/admin/network.lua
index 54afa1b380..98f4395495 100644
--- a/modules/admin-full/luasrc/controller/admin/network.lua
+++ b/modules/admin-full/luasrc/controller/admin/network.lua
@@ -231,7 +231,6 @@ function wifi_delete(network)
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
@@ -241,7 +240,7 @@ function wifi_delete(network)
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
@@ -391,13 +390,11 @@ local function wifi_reconnect_shutdown(shutdown, wnet)
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