-function iface_shutdown(iface)
- local netmd = require "luci.model.network".init()
- local net = netmd:get_network(iface)
- if net then
- luci.sys.call("env -i /sbin/ifdown %s >/dev/null 2>/dev/null"
- % luci.util.shellquote(iface))
- luci.http.status(200, "Shutdown")
- return
- end
-
- luci.http.status(404, "No such interface")
-end
-
-function iface_delete(iface)
- local netmd = require "luci.model.network".init()
- local net = netmd:del_network(iface)
- if net then
- luci.sys.call("env -i /sbin/ifdown %s >/dev/null 2>/dev/null"
- % luci.util.shellquote(iface))
- luci.http.redirect(luci.dispatcher.build_url("admin/network/network"))
- netmd:commit("network")
- netmd:commit("wireless")
- return
- end
-
- luci.http.status(404, "No such interface")
-end
-