git.99rst.org
/
openwrt-luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
| inline |
side by side
(parent:
c3e8976
)
modules/admin-full: commit uci and restart corresponding radio when removing wifi...
author
Jo-Philipp Wich
<redacted>
Wed, 26 Oct 2011 22:29:57 +0000
(22:29 +0000)
committer
Jo-Philipp Wich
<redacted>
Wed, 26 Oct 2011 22:29:57 +0000
(22:29 +0000)
modules/admin-full/luasrc/controller/admin/network.lua
patch
|
blob
|
history
diff --git
a/modules/admin-full/luasrc/controller/admin/network.lua
b/modules/admin-full/luasrc/controller/admin/network.lua
index 954ba12f52d97be968a3144263bd9df7c06dd851..87cc040ea7854756738e65f746d3edf3f758d3da 100644
(file)
--- a/
modules/admin-full/luasrc/controller/admin/network.lua
+++ b/
modules/admin-full/luasrc/controller/admin/network.lua
@@
-198,9
+198,17
@@
end
function wifi_delete(network)
local ntm = require "luci.model.network".init()
+ local net = ntm:get_wifinet(network)
- ntm:del_wifinet(network)
- ntm:save("wireless")
+ if net then
+ local dev = net:get_device()
+ if dev then
+ luci.sys.call("env -i /sbin/wifi down %q" % dev:name())
+ ntm:del_wifinet(network)
+ ntm:commit("wireless")
+ luci.sys.call("env -i /sbin/wifi up %q" % dev:name())
+ end
+ end
luci.http.redirect(luci.dispatcher.build_url("admin/network/wireless"))
end
git clone https://git.99rst.org/PROJECT