diff options
Diffstat (limited to 'modules/luci-mod-admin-full/luasrc/controller')
-rw-r--r-- | modules/luci-mod-admin-full/luasrc/controller/admin/network.lua | 36 |
1 files changed, 1 insertions, 35 deletions
diff --git a/modules/luci-mod-admin-full/luasrc/controller/admin/network.lua b/modules/luci-mod-admin-full/luasrc/controller/admin/network.lua index 4605ffaf33..4680687883 100644 --- a/modules/luci-mod-admin-full/luasrc/controller/admin/network.lua +++ b/modules/luci-mod-admin-full/luasrc/controller/admin/network.lua @@ -1,5 +1,5 @@ -- Copyright 2008 Steven Barth <steven@midlink.org> --- Copyright 2011-2015 Jo-Philipp Wich <jow@openwrt.org> +-- Copyright 2011-2018 Jo-Philipp Wich <jo@mein.io> -- Licensed to the public under the Apache License 2.0. module("luci.controller.admin.network", package.seeall) @@ -82,18 +82,12 @@ function index() page = entry({"admin", "network", "iface_add"}, form("admin_network/iface_add"), nil) page.leaf = true - page = entry({"admin", "network", "iface_delete"}, post("iface_delete"), nil) - page.leaf = true - page = entry({"admin", "network", "iface_status"}, call("iface_status"), nil) page.leaf = true page = entry({"admin", "network", "iface_reconnect"}, post("iface_reconnect"), nil) page.leaf = true - page = entry({"admin", "network", "iface_shutdown"}, post("iface_shutdown"), nil) - page.leaf = true - page = entry({"admin", "network", "network"}, arcombine(cbi("admin_network/network"), cbi("admin_network/ifaces")), _("Interfaces"), 10) page.leaf = true page.subindex = true @@ -276,34 +270,6 @@ function iface_reconnect(iface) luci.http.status(404, "No such interface") end -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 - function wifi_status(devs) local s = require "luci.tools.status" local rv = { } |