diff options
author | Sven Roederer <freifunk@it-solutions.geroedel.de> | 2019-02-03 14:13:35 +0100 |
---|---|---|
committer | Sven Roederer <freifunk@it-solutions.geroedel.de> | 2019-02-13 21:23:34 +0100 |
commit | 4654ba92c3999d84b08211f05d2ccb5ea9da731b (patch) | |
tree | 06cedf8e8badc0ce584d8bd5e97fab7476c81549 /applications/luci-app-freifunk-diagnostics/luasrc/controller/freifunk/diag.lua | |
parent | eda8f02dac3caa4d0f52cd1e860d7a392c295df3 (diff) |
treewide: move freifunk-related packages to separate repo
Even Freifunk was one of the major factory to create the LuCI-system, it's
now only a very small part of LuCI. LuCI has become a much bigger thing
and it seems that it's time to move the packages only relating to Freifunk
into it's own feed.
On the mailinglist it was discussed [1] and a repo below the general
Freifunk team on github was created.
This commit removes all packages that will be hosted in the new repo [2]
1 - http://lists.freifunk.net/pipermail/wlannews-freifunk.net/2019-February/004818.html
2 - https://github.com/freifunk/openwrt-packages
Signed-off-by: Sven Roederer <freifunk@it-solutions.geroedel.de>
Diffstat (limited to 'applications/luci-app-freifunk-diagnostics/luasrc/controller/freifunk/diag.lua')
-rw-r--r-- | applications/luci-app-freifunk-diagnostics/luasrc/controller/freifunk/diag.lua | 72 |
1 files changed, 0 insertions, 72 deletions
diff --git a/applications/luci-app-freifunk-diagnostics/luasrc/controller/freifunk/diag.lua b/applications/luci-app-freifunk-diagnostics/luasrc/controller/freifunk/diag.lua deleted file mode 100644 index 92b3afc80d..0000000000 --- a/applications/luci-app-freifunk-diagnostics/luasrc/controller/freifunk/diag.lua +++ /dev/null @@ -1,72 +0,0 @@ --- Copyright 2008 Steven Barth <steven@midlink.org> --- Copyright 2011 Jo-Philipp Wich <jow@openwrt.org> --- Copyright 2013 Manuel Munz <freifunk@somakoma.de> --- Licensed to the public under the Apache License 2.0. - -module("luci.controller.freifunk.diag", package.seeall) - -function index() - local uci = require("luci.model.uci").cursor() - local page - page = node("freifunk", "status", "diagnostics") - page.target = template("freifunk/diagnostics") - page.title = _("Diagnostics") - page.order = 60 - - page = entry({"freifunk", "status", "diag_ping"}, call("diag_ping"), nil) - page.leaf = true - - page = entry({"freifunk", "status", "diag_nslookup"}, call("diag_nslookup"), nil) - page.leaf = true - - page = entry({"freifunk", "status", "diag_traceroute"}, call("diag_traceroute"), nil) - page.leaf = true - - page = entry({"freifunk", "status", "diag_ping6"}, call("diag_ping6"), nil) - page.leaf = true - - page = entry({"freifunk", "status", "diag_traceroute6"}, call("diag_traceroute6"), nil) - page.leaf = true -end - -function diag_command(cmd, addr) - if addr and addr:match("^[a-zA-Z0-9%-%.:_]+$") then - luci.http.prepare_content("text/plain") - - local util = io.popen(cmd % luci.util.shellquote(addr)) - if util then - while true do - local ln = util:read("*l") - if not ln then break end - luci.http.write(ln) - luci.http.write("\n") - end - - util:close() - end - - return - end - - luci.http.status(500, "Bad address") -end - -function diag_ping(addr) - diag_command("ping -c 5 -W 1 %s 2>&1", addr) -end - -function diag_traceroute(addr) - diag_command("traceroute -q 1 -w 1 -n %s 2>&1", addr) -end - -function diag_nslookup(addr) - diag_command("nslookup %s 2>&1", addr) -end - -function diag_ping6(addr) - diag_command("ping6 -c 5 %s 2>&1", addr) -end - -function diag_traceroute6(addr) - diag_command("traceroute6 -q 1 -w 2 -n %s 2>&1", addr) -end |