From d05d5d24d811537db64699c17309ca8bccc66ebd Mon Sep 17 00:00:00 2001 From: Packet Please Date: Sat, 3 Jun 2023 16:12:17 +0200 Subject: [PATCH 1/6] packages: fix uci-defaults permissions, +x not needed Signed-off-by: Packet Please --- .../uci-defaults/freifunk-berlin-01-migration.sh | 0 .../uci-defaults/freifunk-berlin-correct-nsm2-txpower | 0 .../uci-defaults/freifunk-berlin-system-defaults | 0 3 files changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 packages/falter-berlin-migration/uci-defaults/freifunk-berlin-01-migration.sh mode change 100755 => 100644 packages/falter-berlin-network-defaults/uci-defaults/freifunk-berlin-correct-nsm2-txpower mode change 100755 => 100644 packages/falter-berlin-system-defaults/uci-defaults/freifunk-berlin-system-defaults diff --git a/packages/falter-berlin-migration/uci-defaults/freifunk-berlin-01-migration.sh b/packages/falter-berlin-migration/uci-defaults/freifunk-berlin-01-migration.sh old mode 100755 new mode 100644 diff --git a/packages/falter-berlin-network-defaults/uci-defaults/freifunk-berlin-correct-nsm2-txpower b/packages/falter-berlin-network-defaults/uci-defaults/freifunk-berlin-correct-nsm2-txpower old mode 100755 new mode 100644 diff --git a/packages/falter-berlin-system-defaults/uci-defaults/freifunk-berlin-system-defaults b/packages/falter-berlin-system-defaults/uci-defaults/freifunk-berlin-system-defaults old mode 100755 new mode 100644 From 21997477bf586ae3b82e8bc5e4012a84886a5bed Mon Sep 17 00:00:00 2001 From: Packet Please Date: Mon, 5 Jun 2023 00:43:45 +0200 Subject: [PATCH 2/6] packages: remove luci-app-olsr2, it never found usage Signed-off-by: Packet Please --- luci/luci-app-olsr2/Makefile | 15 -- .../luasrc/controller/olsr2.lua | 246 ------------------ luci/luci-app-olsr2/luasrc/tools/olsr2.lua | 33 --- .../luasrc/view/status-olsr2/common_js.htm | 2 - .../luasrc/view/status-olsr2/error_olsr.htm | 11 - .../luasrc/view/status-olsr2/interfaces.htm | 52 ---- .../luasrc/view/status-olsr2/legend.htm | 21 -- .../luasrc/view/status-olsr2/neighbors.htm | 167 ------------ .../luasrc/view/status-olsr2/overview.htm | 168 ------------ luci/luci-app-olsr2/po/de/olsr2.po | 238 ----------------- luci/luci-app-olsr2/po/en/olsr2.po | 221 ---------------- luci/luci-app-olsr2/po/templates/olsr2.pot | 224 ---------------- .../luci-app-olsr2/root/etc/config/luci_olsr2 | 2 - .../root/etc/uci-defaults/40_luci-olsr2 | 10 - .../usr/share/rpcd/acl.d/luci-app-olsr2.json | 11 - 15 files changed, 1421 deletions(-) delete mode 100644 luci/luci-app-olsr2/Makefile delete mode 100644 luci/luci-app-olsr2/luasrc/controller/olsr2.lua delete mode 100644 luci/luci-app-olsr2/luasrc/tools/olsr2.lua delete mode 100644 luci/luci-app-olsr2/luasrc/view/status-olsr2/common_js.htm delete mode 100644 luci/luci-app-olsr2/luasrc/view/status-olsr2/error_olsr.htm delete mode 100644 luci/luci-app-olsr2/luasrc/view/status-olsr2/interfaces.htm delete mode 100644 luci/luci-app-olsr2/luasrc/view/status-olsr2/legend.htm delete mode 100644 luci/luci-app-olsr2/luasrc/view/status-olsr2/neighbors.htm delete mode 100644 luci/luci-app-olsr2/luasrc/view/status-olsr2/overview.htm delete mode 100644 luci/luci-app-olsr2/po/de/olsr2.po delete mode 100644 luci/luci-app-olsr2/po/en/olsr2.po delete mode 100644 luci/luci-app-olsr2/po/templates/olsr2.pot delete mode 100644 luci/luci-app-olsr2/root/etc/config/luci_olsr2 delete mode 100755 luci/luci-app-olsr2/root/etc/uci-defaults/40_luci-olsr2 delete mode 100644 luci/luci-app-olsr2/root/usr/share/rpcd/acl.d/luci-app-olsr2.json diff --git a/luci/luci-app-olsr2/Makefile b/luci/luci-app-olsr2/Makefile deleted file mode 100644 index b87c9720..00000000 --- a/luci/luci-app-olsr2/Makefile +++ /dev/null @@ -1,15 +0,0 @@ -# -# Copyright (C) 2008-2014 The LuCI Team -# -# This is free software, licensed under the Apache License, Version 2.0 . -# - -include $(TOPDIR)/rules.mk - -LUCI_TITLE:=OLSRv2 status module -LUCI_EXTRA_DEPENDS:=+luci-compat +oonf-olsrd2 +luci-lib-json -PKG_RELEASE:=2 - -include ../include-luci.mk - -# call BuildPackage - OpenWrt buildroot signature diff --git a/luci/luci-app-olsr2/luasrc/controller/olsr2.lua b/luci/luci-app-olsr2/luasrc/controller/olsr2.lua deleted file mode 100644 index 6c11afed..00000000 --- a/luci/luci-app-olsr2/luasrc/controller/olsr2.lua +++ /dev/null @@ -1,246 +0,0 @@ -module("luci.controller.olsr2", package.seeall) - -local neigh_table = nil -local ifaddr_table = nil - -function index() - if not nixio.fs.access("/etc/config/olsrd2") then - return - end - - require("luci.model.uci") - local uci = luci.model.uci.cursor_state() - - local page = node("admin", "status", "olsr2") - page.target = template("status-olsr2/overview") - page.title = _("OLSRv2") - page.subindex = true - page.acl_depends = { "luci-app-olsr2" } - - local page = node("admin", "status", "olsr2", "json") - page.target = call("action_json") - page.title = nil - page.leaf = true - - local page = node("admin", "status", "olsr2", "neighbors") - page.target = call("action_neigh") - page.title = _("Neighbors") - page.subindex = true - page.order = 5 - - --local page = node("admin", "status", "olsr2", "interfaces") - --page.target = call("action_interfaces") - --page.title = _("Interfaces") - --page.order = 10 -end - -function action_json() - local http = require "luci.http" - local utl = require "luci.util" - local uci = require "luci.model.uci".cursor() - local json = require "luci.json" - - local data, error = fetch_jsoninfo() - local jsonreq = json.encode(data) - http.prepare_content("application/json") - http.write(jsonreq) -end - -local function local_mac_lookup(ipaddr) - local _, rt - for _, rt in ipairs(luci.ip.routes({ type = 1, src = ipaddr })) do - local link = rt.dev and luci.ip.link(rt.dev) - local mac = link and luci.ip.checkmac(link.mac) - if mac then return mac end - end -end - -local function remote_mac_lookup(ipaddr) - local _, n - for _, n in ipairs(luci.ip.neighbors({ dest = ipaddr })) do - local mac = luci.ip.checkmac(n.mac) - if mac then return mac end - end -end - --- Shamelessly stolen from https://stackoverflow.com/a/16643628 -function get_ip_type(ip) - local R = {IPV6 = 0, IPV4 = 1, ERROR = 2, STRING = 3} - if type(ip) ~= "string" then return R.ERROR end - - -- check for format 1.11.111.111 for ipv4 - local chunks = {ip:match("^(%d+)%.(%d+)%.(%d+)%.(%d+)$")} - if #chunks == 4 then - for _,v in pairs(chunks) do - if tonumber(v) > 255 then return R.STRING end - end - return R.IPV4 - end - - -- check for ipv6 format, should be 8 'chunks' of numbers/letters - -- without leading/trailing chars - -- or fewer than 8 chunks, but with only one `::` group - local chunks = {ip:match("^"..(("([a-fA-F0-9]*):"):rep(8):gsub(":$","$")))} - if #chunks == 8 or #chunks < 8 and ip:match('::') and not ip:gsub("::","",1):match('::') then - for _,v in pairs(chunks) do - if #v > 0 and tonumber(v, 16) > 65535 then - return R.STRING - end - end - return R.IPV6 - end - - return R.STRING -end - -function action_neigh(json) - local data, error = fetch_jsoninfo() - local links = data['link'] - - if error then - return - end - - local uci = require "luci.model.uci".cursor_state() - local resolve = uci:get("luci_olsr2", "general", "resolve") - local ntm = require "luci.model.network".init() - local devices = ntm:get_wifidevs() - local sys = require "luci.sys" - local assoclist = {} - local ntm = require "luci.model.network" - local ipc = require "luci.ip" - local nxo = require "nixio" - local defaultgw6 - local defaultgw4 - - -- TODO: What if multiple default gateways exist with different metrics? - -- make sure, that only the one with the highest priority gets selected. - ipc.routes({ family = 4, type = 1, dest_exact = "0.0.0.0/0" }, - function(rt) defaultgw4 = rt.gw end) - - ipc.routes({ family = 6, type = 1, dest_exact = "::/0" }, - function(rt) defaultgw6 = rt.gw end) - - local function compare(a,b) - local aproto = get_ip_type(a['neighbor_originator']) - local bproto = get_ip_type(b['neighbor_originator']) - - if aproto == bproto then - return a['domain_metric_in_raw']+a['domain_metric_out_raw'] < b['domain_metric_in_raw']+b['domain_metric_out_raw'] - else - return aproto < bproto - end - end - - for _, dev in ipairs(devices) do - for _, net in ipairs(dev:get_wifinets()) do - local radio = net:get_device() - assoclist[#assoclist+1] = {} - assoclist[#assoclist]['ifname'] = net:ifname() - assoclist[#assoclist]['network'] = net:network()[1] - assoclist[#assoclist]['device'] = radio and radio:name() or nil - assoclist[#assoclist]['list'] = net:assoclist() - end - end - - for k, v in ipairs(links) do - local snr = 0 - local signal = 0 - local noise = 0 - local mac = "" - local ip - local neihgt = {} - - if resolve == "1" then - hostname = nixio.getnameinfo(v['neighbor_originator'], nil, 100) - if hostname then - v['hostname'] = hostname - end - end - - local lmac = local_mac_lookup(v['link_bindto']) - local rmac = remote_mac_lookup(v['neighbor_originator']) - - local proto = get_ip_type(v['neighbor_originator']) - if proto == 0 then - v['proto'] = 6 - elseif proto == 1 then - v['proto'] = 4 - else - v['proto'] = 0 - end - - for _, val in ipairs(assoclist) do - if val.ifname == v['if'] and val.list then - local assocmac, assot - for assocmac, assot in pairs(val.list) do - if rmac == luci.ip.checkmac(assocmac) then - signal = tonumber(assot.signal) - noise = tonumber(assot.noise) - snr = (noise*-1) - (signal*-1) - end - end - end - end - v['snr'] = snr - v['signal'] = signal - v['noise'] = noise - if rmac then - v['remote_mac'] = rmac - end - if lmac then - v['local_mac'] = lmac - end - - if defaultgw4 == v['neighbor_originator'] or defaultgw6 == v['neighbor_originator'] then - v['defaultgw'] = 1 - end - end - - table.sort(links, compare) - luci.template.render("status-olsr2/neighbors", {links=links}) -end - -function action_interfaces() - local data, has_v4, has_v6, error = fetch_jsoninfo('interfaces') - local ntm = require "luci.model.network".init() - - if error then - return - end - - local function compare(a,b) - return a.proto < b.proto - end - - for k, v in ipairs(data) do - local interface = ntm:get_status_by_address(v.olsrInterface.ipAddress) - if interface then - v.interface = interface - end - end - - table.sort(data, compare) - luci.template.render("status-olsr/interfaces", {iface=data, has_v4=has_v4, has_v6=has_v6}) -end - --- Internal -function fetch_jsoninfo() - local uci = require "luci.model.uci".cursor_state() - local utl = require "luci.util" - local json = require "luci.json" - - local olsr2_port = tonumber(uci:get("olsrd2", "telnet", "port") or "") or 2009 - jsonreq_link = utl.exec("(echo '/nhdpinfo json link' | nc 127.0.0.1 %d) 2>/dev/null" % olsr2_port) - - if not jsonreq_link or jsonreq_link == "" then - luci.template.render("status-olsr2/error_olsr") - return nil, true - end - - local jsondata = {} - jsondata['link'] = json.decode(jsonreq_link)['link'] or {} - - return jsondata, false -end - diff --git a/luci/luci-app-olsr2/luasrc/tools/olsr2.lua b/luci/luci-app-olsr2/luasrc/tools/olsr2.lua deleted file mode 100644 index e6e84d5a..00000000 --- a/luci/luci-app-olsr2/luasrc/tools/olsr2.lua +++ /dev/null @@ -1,33 +0,0 @@ --- Copyright 2011 Manuel Munz --- Licensed to the public under the Apache License 2.0. - -module("luci.tools.olsr2", package.seeall) - -function etx_color(etx) - local color = "#bb3333" - if etx == 0 then - color = "#bb3333" - elseif etx < 2 then - color = "#00cc00" - elseif etx < 4 then - color = "#ffcb05" - elseif etx < 10 then - color = "#ff6600" - end - return color -end - -function snr_color(snr) - local color = "#bb3333" - if snr == 0 then - color = "#bb3333" - elseif snr > 30 then - color = "#00cc00" - elseif snr > 20 then - color = "#ffcb05" - elseif snr > 5 then - color = "#ff6600" - end - return color -end - diff --git a/luci/luci-app-olsr2/luasrc/view/status-olsr2/common_js.htm b/luci/luci-app-olsr2/luasrc/view/status-olsr2/common_js.htm deleted file mode 100644 index dd34c1f3..00000000 --- a/luci/luci-app-olsr2/luasrc/view/status-olsr2/common_js.htm +++ /dev/null @@ -1,2 +0,0 @@ -<% if has_v4 and has_v6 then %> -<%end %> diff --git a/luci/luci-app-olsr2/luasrc/view/status-olsr2/error_olsr.htm b/luci/luci-app-olsr2/luasrc/view/status-olsr2/error_olsr.htm deleted file mode 100644 index 109cc34b..00000000 --- a/luci/luci-app-olsr2/luasrc/view/status-olsr2/error_olsr.htm +++ /dev/null @@ -1,11 +0,0 @@ -<%# - Copyright 2008 Steven Barth - Copyright 2008 Jo-Philipp Wich - Licensed to the public under the Apache License 2.0. --%> - -<%+header%> -

<%:OLSRv2 Daemon%>

-

<%:Unable to connect to the OLSRv2 daemon!%>

-

<%:Make sure that OLSRd2 is running, has telnet configured on port 2009 and accepts connections from "127.0.0.1".%>

-<%+footer%> diff --git a/luci/luci-app-olsr2/luasrc/view/status-olsr2/interfaces.htm b/luci/luci-app-olsr2/luasrc/view/status-olsr2/interfaces.htm deleted file mode 100644 index 12f7cba9..00000000 --- a/luci/luci-app-olsr2/luasrc/view/status-olsr2/interfaces.htm +++ /dev/null @@ -1,52 +0,0 @@ -<%# - Copyright 2008 Steven Barth - Copyright 2008 Jo-Philipp Wich - Copyright 2011 Manuel Munz - Licensed to the public under the Apache License 2.0. --%> - -<% -local i = 1 -%> - -<%+header%> - -

<%:Interfaces%>

- -
- -
- <%:Overview of interfaces where OLSR is running%> - -
-
-
<%:Interface%>
-
<%:Device%>
-
<%:State%>
-
<%:MTU%>
-
<%:WLAN%>
-
<%:Source address%>
-
<%:Netmask%>
-
<%:Broadcast address%>
-
- - <% for k, iface in ipairs(iface) do %> - -
-
<%=iface.interface%>
-
<%=iface.name%>
-
<%=iface.olsrInterface.up and luci.i18n.translate('up') or luci.i18n.translate('down')%>
-
<%=iface.olsrInterface.mtu%>
-
<%=iface.olsrInterface.wireless and luci.i18n.translate('yes') or luci.i18n.translate('no')%>
-
<%=iface.olsrInterface.ipAddress%>
-
<%=iface.olsrInterface.ipv4Address ~= '0.0.0.0' and iface.olsrInterface.ipv4Netmask%>
-
<%=iface.olsrInterface.ipv4Address ~= '0.0.0.0' and iface.olsrInterface.ipv4Broadcast or iface.olsrInterface.ipv6Multicast%>
-
- <% i = ((i % 2) + 1) - end %> -
-
-<%+status-olsr/common_js%> -<%+footer%> - - diff --git a/luci/luci-app-olsr2/luasrc/view/status-olsr2/legend.htm b/luci/luci-app-olsr2/luasrc/view/status-olsr2/legend.htm deleted file mode 100644 index 54fe4b19..00000000 --- a/luci/luci-app-olsr2/luasrc/view/status-olsr2/legend.htm +++ /dev/null @@ -1,21 +0,0 @@ -

<%:Legend%>:

-
    -
  • Metric: <%:Link metric as reported by OLSRD2%>
  • -
  • Link Status: <%:Link status as reported by OLSRD2%>
  • -
  • -
      -
    • <%:Symmetric%>:<%:Both link ends can hear each other%>
    • -
    • <%:Heard%>:<%:We only heard the other link end but they don't seem to be able to hear us%>
    • -
    -
  • -
  • SNR: <%:Signal Noise Ratio in dB%>
  • -
  • -
      -
    • <%:Green%>:<%:Very good (SNR > 30)%>
    • -
    • <%:Yellow%>:<%:Good (30 > SNR > 20)%>
    • -
    • <%:Orange%>:<%:Still usable (20 > SNR > 5)%>
    • -
    • <%:Red%>:<%:Bad (SNR < 5)%>
    • -
    -
  • -
- diff --git a/luci/luci-app-olsr2/luasrc/view/status-olsr2/neighbors.htm b/luci/luci-app-olsr2/luasrc/view/status-olsr2/neighbors.htm deleted file mode 100644 index 5a739599..00000000 --- a/luci/luci-app-olsr2/luasrc/view/status-olsr2/neighbors.htm +++ /dev/null @@ -1,167 +0,0 @@ -<%# - Copyright 2008 Steven Barth - Copyright 2008 Jo-Philipp Wich - Copyright 2011 Manuel Munz - Licensed to the public under the Apache License 2.0. --%> - -<% -local olsrtools = require "luci.tools.olsr2" -local i = 1 - -if luci.http.formvalue("status") == "1" then - local rv = {} - for k, link in ipairs(links) do - local snr_color = olsrtools.snr_color(link["snr"]) - defaultgw_color = "" - if link.defaultgw == 1 then - defaultgw_color = "#ffff99" - end - - rv[#rv+1] = { - rip = link["neighbor_originator"], - hn = link["hostname"], - lip = link["link_bindto"], - ifn = link["if"], - link_status = link["link_status"], - metric_in = link["domain_metric_in"], - metric_out = link["domain_metric_out"], - snr = link["snr"], - signal = link["signal"], - noise = link["noise"], - snr_color = snr_color, - dfgcolor = defaultgw_color, - proto = link["proto"] - } - end - luci.http.prepare_content("application/json") - luci.http.write_json(rv) - return -end -%> - -<%+header%> - - - - -

<%:OLSRv2 connections%>

- -
- -
- <%:Overview of currently established OLSRv2 connections%> - -
-
-
<%:Neighbour IP%>
-
<%:Hostname%>
-
<%:Interface%>
-
<%:Local bind IP%>
-
<%:Link Status%>
-
Metric In
-
Metric Out
-
SNR
-
- - <% local i = 1 - for k, link in ipairs(links) do - snr_color = olsrtools.snr_color(link["snr"]) - - if link["snr"] == 0 then - link["snr"] = '?' - end - - defaultgw_color = "" - if link["defaultgw"] == 1 then - defaultgw_color = "#ffff99" - end - %> - -
- <% if link.proto == "6" then %> - - <% else %> - - <% end %> - -
<%=link["if"]%>
-
<%=link["link_bindto"]%>
-
<%=link["link_status"]%>
-
<%=link["domain_metric_in"]%>
-
<%=link["domain_metric_out"]%>
-
Noise: <%=link["noise"]%>"><%=link["snr"]%>
-
- <% - i = ((i % 2) + 1) - end %> -
-
- -<%+status-olsr2/legend%> -
-<%+status-olsr2/common_js%> -<%+footer%> diff --git a/luci/luci-app-olsr2/luasrc/view/status-olsr2/overview.htm b/luci/luci-app-olsr2/luasrc/view/status-olsr2/overview.htm deleted file mode 100644 index 0b4efa66..00000000 --- a/luci/luci-app-olsr2/luasrc/view/status-olsr2/overview.htm +++ /dev/null @@ -1,168 +0,0 @@ -<%# - Copyright 2008 Steven Barth - Copyright 2008 Jo-Philipp Wich - Copyright 2011 Manuel Munz - Licensed to the public under the Apache License 2.0. --%> - -<% - -function write_conf(conf, file) - local fs = require "nixio.fs" - if fs.access(conf) then - luci.http.header("Content-Disposition", "attachment; filename="..file) - luci.http.prepare_content("text/plain") - luci.http.write(fs.readfile(conf)) - end -end - -conf = luci.http.formvalue() - -if conf.olsrd2_uci then - write_conf("/etc/config/olsrd2", "olsrd2") - return false -end - -%> - -<%+header%> - - - - -
- -

OLSRv2 <%:Overview%>

- -
- <%:Network%> - -
-
<%:Interfaces%>
-
<%:Neighbors%>
-
<%:Nodes%>
-
<%:HNA%>
-
<%:Links total%>
-
<%:Links per node (average)%>
- - -
- - -
-
- - -
- OLSRv2 <%:Configuration%> -
-
<%:Version%>
- - -
-
<%:Download Config%>
-
-
- -<%+footer%> diff --git a/luci/luci-app-olsr2/po/de/olsr2.po b/luci/luci-app-olsr2/po/de/olsr2.po deleted file mode 100644 index d328f6e5..00000000 --- a/luci/luci-app-olsr2/po/de/olsr2.po +++ /dev/null @@ -1,238 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: \n" -"POT-Creation-Date: \n" -"PO-Revision-Date: \n" -"Last-Translator: \n" -"Language-Team: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: de\n" -"X-Generator: Poedit 2.4.2\n" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/legend.htm:17 -msgid "Bad (SNR < 5)" -msgstr "Schlecht (SNR < 5)" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/legend.htm:7 -msgid "Both link ends can hear each other" -msgstr "Beide Endstellen des Link können sich gegenseitig hören" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/interfaces.htm:30 -msgid "Broadcast address" -msgstr "Broadcast-Adresse" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/overview.htm:157 -msgid "Configuration" -msgstr "Einstellungen" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/overview.htm:36 -msgid "" -"Could not get any data. Make sure the telnet interface is activated and " -"allows connections from localhost." -msgstr "" -"Konnte keine Daten bekommen. Stelle sicher, dass die Telnet-Schinttstelle " -"aktiviert ist und einkommen Verbindungen von localhost erlaubt." - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/interfaces.htm:24 -msgid "Device" -msgstr "Gerät" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/overview.htm:162 -msgid "Download Config" -msgstr "Einstellungen herunterladen" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/legend.htm:15 -msgid "Good (30 > SNR > 20)" -msgstr "Gut (30 > SNR > 20)" - -#: luci/luci-app-olsr2/root/usr/share/rpcd/acl.d/luci-app-olsr2.json:3 -msgid "Grant UCI access for luci-app-olsr2" -msgstr "UCI-Zugriff für luci-app-olsr2 erlauben" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/legend.htm:14 -msgid "Green" -msgstr "Grün" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/overview.htm:137 -msgid "HNA" -msgstr "HNA" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/legend.htm:8 -msgid "Heard" -msgstr "Gehört" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/neighbors.htm:55 -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/neighbors.htm:121 -msgid "Hostname" -msgstr "Hostname" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/interfaces.htm:23 -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/neighbors.htm:56 -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/neighbors.htm:122 -msgid "Interface" -msgstr "Schnittstelle" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/interfaces.htm:14 -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/overview.htm:122 -msgid "Interfaces" -msgstr "Schnittstellen" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/legend.htm:1 -msgid "Legend" -msgstr "Legende" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/neighbors.htm:58 -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/neighbors.htm:124 -msgid "Link Status" -msgstr "Link Status" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/legend.htm:3 -msgid "Link metric as reported by OLSRD2" -msgstr "Link-Metrik nach Bericht von OLSRd2" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/legend.htm:4 -msgid "Link status as reported by OLSRD2" -msgstr "Link-Status nach Bericht von OLSRd2" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/overview.htm:147 -msgid "Links per node (average)" -msgstr "Links pro Knoten (Durchschnitt)" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/overview.htm:142 -msgid "Links total" -msgstr "Links insgesamt" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/neighbors.htm:57 -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/neighbors.htm:123 -msgid "Local bind IP" -msgstr "Lokale Bind-Adresse" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/interfaces.htm:26 -msgid "MTU" -msgstr "MTU" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/error_olsr.htm:10 -msgid "" -"Make sure that OLSRd2 is running, has telnet configured on port 2009 and " -"accepts connections from \"127.0.0.1\"." -msgstr "" -"Stelle sicher, dass OLSRd2 läuft, telnet auf port 2009 eingestellt hat und " -"Verbindungen von \"127.0.0.1\" akzeptiert." - -#: luci/luci-app-olsr2/luasrc/controller/olsr2.lua:27 -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/overview.htm:127 -msgid "Neighbors" -msgstr "Nachbarn" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/neighbors.htm:54 -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/neighbors.htm:120 -msgid "Neighbour IP" -msgstr "Nachbar-IP" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/interfaces.htm:29 -msgid "Netmask" -msgstr "Netzmaske" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/overview.htm:119 -msgid "Network" -msgstr "Netzwerk" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/overview.htm:132 -msgid "Nodes" -msgstr "Knoten" - -#: luci/luci-app-olsr2/luasrc/controller/olsr2.lua:16 -msgid "OLSRv2" -msgstr "OLSRv2" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/error_olsr.htm:8 -msgid "OLSRv2 Daemon" -msgstr "OLSRv2 Daemon" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/neighbors.htm:111 -msgid "OLSRv2 connections" -msgstr "OLSRv2-Verbindungen" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/legend.htm:16 -msgid "Orange" -msgstr "Orange" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/overview.htm:116 -msgid "Overview" -msgstr "Übersicht" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/neighbors.htm:116 -msgid "Overview of currently established OLSRv2 connections" -msgstr "Übersicht der aufgebauten OLSR-Verbindungen" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/interfaces.htm:19 -msgid "Overview of interfaces where OLSR is running" -msgstr "Übersicht der Schnittstellen, auf denen OLSR läuft" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/legend.htm:17 -msgid "Red" -msgstr "Rot" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/legend.htm:11 -msgid "Signal Noise Ratio in dB" -msgstr "Signal-Rausch-Abstand in dB" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/interfaces.htm:28 -msgid "Source address" -msgstr "Quelladresse" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/interfaces.htm:25 -msgid "State" -msgstr "Status" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/legend.htm:16 -msgid "Still usable (20 > SNR > 5)" -msgstr "Noch zu gebrauchen (20 > SNR > 5)" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/legend.htm:7 -msgid "Symmetric" -msgstr "Symmetrisch" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/error_olsr.htm:9 -msgid "Unable to connect to the OLSRv2 daemon!" -msgstr "Verbinden zum OLSRv2 Daemon nicht möglich!" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/overview.htm:159 -msgid "Version" -msgstr "Version" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/legend.htm:14 -msgid "Very good (SNR > 30)" -msgstr "Sehr gut (SNR > 30)" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/interfaces.htm:27 -msgid "WLAN" -msgstr "WLAN" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/legend.htm:8 -msgid "" -"We only heard the other link end but they don't seem to be able to hear " -"us" -msgstr "Wir haben die Gegenstelle gehört, aber sie scheint uns nicht zu hören" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/legend.htm:15 -msgid "Yellow" -msgstr "Gelb" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/interfaces.htm:38 -msgid "down" -msgstr "herunter" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/interfaces.htm:40 -msgid "no" -msgstr "nein" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/interfaces.htm:38 -msgid "up" -msgstr "herauf" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/interfaces.htm:40 -msgid "yes" -msgstr "ja" diff --git a/luci/luci-app-olsr2/po/en/olsr2.po b/luci/luci-app-olsr2/po/en/olsr2.po deleted file mode 100644 index d5140cc6..00000000 --- a/luci/luci-app-olsr2/po/en/olsr2.po +++ /dev/null @@ -1,221 +0,0 @@ -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/legend.htm:17 -msgid "Bad (SNR < 5)" -msgstr "" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/legend.htm:7 -msgid "Both link ends can hear each other" -msgstr "" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/interfaces.htm:30 -msgid "Broadcast address" -msgstr "" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/overview.htm:157 -msgid "Configuration" -msgstr "" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/overview.htm:36 -msgid "" -"Could not get any data. Make sure the telnet interface is activated and " -"allows connections from localhost." -msgstr "" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/interfaces.htm:24 -msgid "Device" -msgstr "" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/overview.htm:162 -msgid "Download Config" -msgstr "" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/legend.htm:15 -msgid "Good (30 > SNR > 20)" -msgstr "" - -#: luci/luci-app-olsr2/root/usr/share/rpcd/acl.d/luci-app-olsr2.json:3 -msgid "Grant UCI access for luci-app-olsr2" -msgstr "" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/legend.htm:14 -msgid "Green" -msgstr "" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/overview.htm:137 -msgid "HNA" -msgstr "" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/legend.htm:8 -msgid "Heard" -msgstr "" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/neighbors.htm:55 -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/neighbors.htm:121 -msgid "Hostname" -msgstr "" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/interfaces.htm:23 -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/neighbors.htm:56 -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/neighbors.htm:122 -msgid "Interface" -msgstr "" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/interfaces.htm:14 -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/overview.htm:122 -msgid "Interfaces" -msgstr "" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/legend.htm:1 -msgid "Legend" -msgstr "" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/neighbors.htm:58 -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/neighbors.htm:124 -msgid "Link Status" -msgstr "" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/legend.htm:3 -msgid "Link metric as reported by OLSRD2" -msgstr "" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/legend.htm:4 -msgid "Link status as reported by OLSRD2" -msgstr "" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/overview.htm:147 -msgid "Links per node (average)" -msgstr "" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/overview.htm:142 -msgid "Links total" -msgstr "" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/neighbors.htm:57 -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/neighbors.htm:123 -msgid "Local bind IP" -msgstr "" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/interfaces.htm:26 -msgid "MTU" -msgstr "" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/error_olsr.htm:10 -msgid "" -"Make sure that OLSRd2 is running, has telnet configured on port 2009 and " -"accepts connections from \"127.0.0.1\"." -msgstr "" - -#: luci/luci-app-olsr2/luasrc/controller/olsr2.lua:27 -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/overview.htm:127 -msgid "Neighbors" -msgstr "" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/neighbors.htm:54 -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/neighbors.htm:120 -msgid "Neighbour IP" -msgstr "" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/interfaces.htm:29 -msgid "Netmask" -msgstr "" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/overview.htm:119 -msgid "Network" -msgstr "" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/overview.htm:132 -msgid "Nodes" -msgstr "" - -#: luci/luci-app-olsr2/luasrc/controller/olsr2.lua:16 -msgid "OLSRv2" -msgstr "" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/error_olsr.htm:8 -msgid "OLSRv2 Daemon" -msgstr "" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/neighbors.htm:111 -msgid "OLSRv2 connections" -msgstr "" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/legend.htm:16 -msgid "Orange" -msgstr "" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/overview.htm:116 -msgid "Overview" -msgstr "" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/neighbors.htm:116 -msgid "Overview of currently established OLSRv2 connections" -msgstr "" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/interfaces.htm:19 -msgid "Overview of interfaces where OLSR is running" -msgstr "" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/legend.htm:17 -msgid "Red" -msgstr "" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/legend.htm:11 -msgid "Signal Noise Ratio in dB" -msgstr "" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/interfaces.htm:28 -msgid "Source address" -msgstr "" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/interfaces.htm:25 -msgid "State" -msgstr "" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/legend.htm:16 -msgid "Still usable (20 > SNR > 5)" -msgstr "" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/legend.htm:7 -msgid "Symmetric" -msgstr "" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/error_olsr.htm:9 -msgid "Unable to connect to the OLSRv2 daemon!" -msgstr "" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/overview.htm:159 -msgid "Version" -msgstr "" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/legend.htm:14 -msgid "Very good (SNR > 30)" -msgstr "" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/interfaces.htm:27 -msgid "WLAN" -msgstr "" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/legend.htm:8 -msgid "" -"We only heard the other link end but they don't seem to be able to hear " -"us" -msgstr "" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/legend.htm:15 -msgid "Yellow" -msgstr "" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/interfaces.htm:38 -msgid "down" -msgstr "" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/interfaces.htm:40 -msgid "no" -msgstr "" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/interfaces.htm:38 -msgid "up" -msgstr "" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/interfaces.htm:40 -msgid "yes" -msgstr "" diff --git a/luci/luci-app-olsr2/po/templates/olsr2.pot b/luci/luci-app-olsr2/po/templates/olsr2.pot deleted file mode 100644 index a13f4d11..00000000 --- a/luci/luci-app-olsr2/po/templates/olsr2.pot +++ /dev/null @@ -1,224 +0,0 @@ -msgid "" -msgstr "Content-Type: text/plain; charset=UTF-8" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/legend.htm:17 -msgid "Bad (SNR < 5)" -msgstr "" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/legend.htm:7 -msgid "Both link ends can hear each other" -msgstr "" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/interfaces.htm:30 -msgid "Broadcast address" -msgstr "" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/overview.htm:157 -msgid "Configuration" -msgstr "" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/overview.htm:36 -msgid "" -"Could not get any data. Make sure the telnet interface is activated and " -"allows connections from localhost." -msgstr "" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/interfaces.htm:24 -msgid "Device" -msgstr "" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/overview.htm:162 -msgid "Download Config" -msgstr "" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/legend.htm:15 -msgid "Good (30 > SNR > 20)" -msgstr "" - -#: luci/luci-app-olsr2/root/usr/share/rpcd/acl.d/luci-app-olsr2.json:3 -msgid "Grant UCI access for luci-app-olsr2" -msgstr "" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/legend.htm:14 -msgid "Green" -msgstr "" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/overview.htm:137 -msgid "HNA" -msgstr "" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/legend.htm:8 -msgid "Heard" -msgstr "" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/neighbors.htm:55 -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/neighbors.htm:121 -msgid "Hostname" -msgstr "" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/interfaces.htm:23 -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/neighbors.htm:56 -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/neighbors.htm:122 -msgid "Interface" -msgstr "" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/interfaces.htm:14 -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/overview.htm:122 -msgid "Interfaces" -msgstr "" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/legend.htm:1 -msgid "Legend" -msgstr "" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/neighbors.htm:58 -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/neighbors.htm:124 -msgid "Link Status" -msgstr "" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/legend.htm:3 -msgid "Link metric as reported by OLSRD2" -msgstr "" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/legend.htm:4 -msgid "Link status as reported by OLSRD2" -msgstr "" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/overview.htm:147 -msgid "Links per node (average)" -msgstr "" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/overview.htm:142 -msgid "Links total" -msgstr "" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/neighbors.htm:57 -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/neighbors.htm:123 -msgid "Local bind IP" -msgstr "" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/interfaces.htm:26 -msgid "MTU" -msgstr "" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/error_olsr.htm:10 -msgid "" -"Make sure that OLSRd2 is running, has telnet configured on port 2009 and " -"accepts connections from \"127.0.0.1\"." -msgstr "" - -#: luci/luci-app-olsr2/luasrc/controller/olsr2.lua:27 -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/overview.htm:127 -msgid "Neighbors" -msgstr "" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/neighbors.htm:54 -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/neighbors.htm:120 -msgid "Neighbour IP" -msgstr "" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/interfaces.htm:29 -msgid "Netmask" -msgstr "" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/overview.htm:119 -msgid "Network" -msgstr "" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/overview.htm:132 -msgid "Nodes" -msgstr "" - -#: luci/luci-app-olsr2/luasrc/controller/olsr2.lua:16 -msgid "OLSRv2" -msgstr "" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/error_olsr.htm:8 -msgid "OLSRv2 Daemon" -msgstr "" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/neighbors.htm:111 -msgid "OLSRv2 connections" -msgstr "" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/legend.htm:16 -msgid "Orange" -msgstr "" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/overview.htm:116 -msgid "Overview" -msgstr "" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/neighbors.htm:116 -msgid "Overview of currently established OLSRv2 connections" -msgstr "" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/interfaces.htm:19 -msgid "Overview of interfaces where OLSR is running" -msgstr "" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/legend.htm:17 -msgid "Red" -msgstr "" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/legend.htm:11 -msgid "Signal Noise Ratio in dB" -msgstr "" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/interfaces.htm:28 -msgid "Source address" -msgstr "" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/interfaces.htm:25 -msgid "State" -msgstr "" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/legend.htm:16 -msgid "Still usable (20 > SNR > 5)" -msgstr "" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/legend.htm:7 -msgid "Symmetric" -msgstr "" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/error_olsr.htm:9 -msgid "Unable to connect to the OLSRv2 daemon!" -msgstr "" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/overview.htm:159 -msgid "Version" -msgstr "" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/legend.htm:14 -msgid "Very good (SNR > 30)" -msgstr "" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/interfaces.htm:27 -msgid "WLAN" -msgstr "" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/legend.htm:8 -msgid "" -"We only heard the other link end but they don't seem to be able to hear " -"us" -msgstr "" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/legend.htm:15 -msgid "Yellow" -msgstr "" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/interfaces.htm:38 -msgid "down" -msgstr "" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/interfaces.htm:40 -msgid "no" -msgstr "" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/interfaces.htm:38 -msgid "up" -msgstr "" - -#: luci/luci-app-olsr2/luasrc/view/status-olsr2/interfaces.htm:40 -msgid "yes" -msgstr "" diff --git a/luci/luci-app-olsr2/root/etc/config/luci_olsr2 b/luci/luci-app-olsr2/root/etc/config/luci_olsr2 deleted file mode 100644 index 9fed0c71..00000000 --- a/luci/luci-app-olsr2/root/etc/config/luci_olsr2 +++ /dev/null @@ -1,2 +0,0 @@ -config 'olsr2' 'general' - option 'resolve' '1' diff --git a/luci/luci-app-olsr2/root/etc/uci-defaults/40_luci-olsr2 b/luci/luci-app-olsr2/root/etc/uci-defaults/40_luci-olsr2 deleted file mode 100755 index 747d8cf9..00000000 --- a/luci/luci-app-olsr2/root/etc/uci-defaults/40_luci-olsr2 +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh - -uci -q batch <<-EOF >/dev/null - delete ucitrack.@olsrd2[-1] - add ucitrack olsrd2 - set ucitrack.@olsrd2[-1].init=olsrd2 - commit ucitrack -EOF - -exit 0 diff --git a/luci/luci-app-olsr2/root/usr/share/rpcd/acl.d/luci-app-olsr2.json b/luci/luci-app-olsr2/root/usr/share/rpcd/acl.d/luci-app-olsr2.json deleted file mode 100644 index 3e89c1d2..00000000 --- a/luci/luci-app-olsr2/root/usr/share/rpcd/acl.d/luci-app-olsr2.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "luci-app-olsr2": { - "description": "Grant UCI access for luci-app-olsr2", - "read": { - "uci": [ "luci_olsr2", "olsrd2" ] - }, - "write": { - "uci": [ "luci_olsr2", "olsrd2" ] - } - } -} From 7b9d2dd86fae80fb1bf07b0d2e1551ca45ec1d02 Mon Sep 17 00:00:00 2001 From: Packet Please Date: Mon, 5 Jun 2023 01:08:33 +0200 Subject: [PATCH 3/6] packages: merge falter-common-olsr into falter-common Signed-off-by: Packet Please --- packages/falter-common/Makefile | 22 ++----------------- .../etc/config/freifunk | 0 .../etc/freifunk_release | 0 .../etc/init.d/freifunk | 0 .../etc/profile.d/10_dynbanner.sh | 0 .../etc/profile.d/20_aliases.sh | 0 .../etc/uci-defaults/freifunk | 0 .../freifunk-berlin-ffwizard3-json | 0 .../etc/uci-defaults/freifunk-olsrv1 | 0 .../lib/upgrade/keep.d/ffwizard3 | 0 .../{files-common => files}/sbin/ffwizard2uci | 0 .../{files-common => files}/sbin/uci2ffwizard | 0 .../{files-common => files}/usr/bin/ffdzero | 0 .../{files-olsrv1 => files}/usr/bin/hna.lua | 0 .../{files-common => files}/usr/bin/watch.sh | 0 15 files changed, 2 insertions(+), 20 deletions(-) rename packages/falter-common/{files-common => files}/etc/config/freifunk (100%) rename packages/falter-common/{files-common => files}/etc/freifunk_release (100%) rename packages/falter-common/{files-common => files}/etc/init.d/freifunk (100%) rename packages/falter-common/{files-common => files}/etc/profile.d/10_dynbanner.sh (100%) rename packages/falter-common/{files-common => files}/etc/profile.d/20_aliases.sh (100%) rename packages/falter-common/{files-common => files}/etc/uci-defaults/freifunk (100%) rename packages/falter-common/{files-common => files}/etc/uci-defaults/freifunk-berlin-ffwizard3-json (100%) rename packages/falter-common/{files-olsrv1 => files}/etc/uci-defaults/freifunk-olsrv1 (100%) rename packages/falter-common/{files-common => files}/lib/upgrade/keep.d/ffwizard3 (100%) rename packages/falter-common/{files-common => files}/sbin/ffwizard2uci (100%) rename packages/falter-common/{files-common => files}/sbin/uci2ffwizard (100%) rename packages/falter-common/{files-common => files}/usr/bin/ffdzero (100%) rename packages/falter-common/{files-olsrv1 => files}/usr/bin/hna.lua (100%) rename packages/falter-common/{files-common => files}/usr/bin/watch.sh (100%) diff --git a/packages/falter-common/Makefile b/packages/falter-common/Makefile index e085a532..9b5add7f 100644 --- a/packages/falter-common/Makefile +++ b/packages/falter-common/Makefile @@ -15,7 +15,7 @@ define Package/falter-common CATEGORY:=LuCI SUBMENU:=9. Freifunk TITLE:=Falter common files - EXTRA_DEPENDS:=uci + EXTRA_DEPENDS:=uci, libuci-lua, lua, olsrd PKGARCH:=all endef @@ -27,19 +27,6 @@ define Package/falter-common/conffiles /etc/config/freifunk endef -define Package/falter-common-olsr - SECTION:=luci - CATEGORY:=LuCI - SUBMENU:=9. Freifunk - TITLE:=Falter common files for olsr-v1 - EXTRA_DEPENDS:=falter-common, olsrd, libuci-lua, lua - PKGARCH:=all -endef - -define Package/falter-common-olsr/description - Additional files and scripts that are needed to run free wireless mesh networks based on OLSRv1. -endef - define Build/Prepare mkdir -p $(PKG_BUILD_DIR) endef @@ -53,13 +40,8 @@ endef FALTER_REVISION:=$(shell git -C $(TOPDIR)/feeds/falter describe --exact-match --tags 2> /dev/null || git -C $(TOPDIR)/feeds/falter rev-parse --short HEAD) define Package/falter-common/install - $(CP) ./files-common/* $(1)/ + $(CP) ./files/* $(1)/ $(SED) 's,%R,$(FALTER_REVISION),g' $(1)/etc/freifunk_release endef -define Package/falter-common-olsr/install - $(CP) ./files-olsrv1/* $(1)/ -endef - $(eval $(call BuildPackage,falter-common)) -$(eval $(call BuildPackage,falter-common-olsr)) diff --git a/packages/falter-common/files-common/etc/config/freifunk b/packages/falter-common/files/etc/config/freifunk similarity index 100% rename from packages/falter-common/files-common/etc/config/freifunk rename to packages/falter-common/files/etc/config/freifunk diff --git a/packages/falter-common/files-common/etc/freifunk_release b/packages/falter-common/files/etc/freifunk_release similarity index 100% rename from packages/falter-common/files-common/etc/freifunk_release rename to packages/falter-common/files/etc/freifunk_release diff --git a/packages/falter-common/files-common/etc/init.d/freifunk b/packages/falter-common/files/etc/init.d/freifunk similarity index 100% rename from packages/falter-common/files-common/etc/init.d/freifunk rename to packages/falter-common/files/etc/init.d/freifunk diff --git a/packages/falter-common/files-common/etc/profile.d/10_dynbanner.sh b/packages/falter-common/files/etc/profile.d/10_dynbanner.sh similarity index 100% rename from packages/falter-common/files-common/etc/profile.d/10_dynbanner.sh rename to packages/falter-common/files/etc/profile.d/10_dynbanner.sh diff --git a/packages/falter-common/files-common/etc/profile.d/20_aliases.sh b/packages/falter-common/files/etc/profile.d/20_aliases.sh similarity index 100% rename from packages/falter-common/files-common/etc/profile.d/20_aliases.sh rename to packages/falter-common/files/etc/profile.d/20_aliases.sh diff --git a/packages/falter-common/files-common/etc/uci-defaults/freifunk b/packages/falter-common/files/etc/uci-defaults/freifunk similarity index 100% rename from packages/falter-common/files-common/etc/uci-defaults/freifunk rename to packages/falter-common/files/etc/uci-defaults/freifunk diff --git a/packages/falter-common/files-common/etc/uci-defaults/freifunk-berlin-ffwizard3-json b/packages/falter-common/files/etc/uci-defaults/freifunk-berlin-ffwizard3-json similarity index 100% rename from packages/falter-common/files-common/etc/uci-defaults/freifunk-berlin-ffwizard3-json rename to packages/falter-common/files/etc/uci-defaults/freifunk-berlin-ffwizard3-json diff --git a/packages/falter-common/files-olsrv1/etc/uci-defaults/freifunk-olsrv1 b/packages/falter-common/files/etc/uci-defaults/freifunk-olsrv1 similarity index 100% rename from packages/falter-common/files-olsrv1/etc/uci-defaults/freifunk-olsrv1 rename to packages/falter-common/files/etc/uci-defaults/freifunk-olsrv1 diff --git a/packages/falter-common/files-common/lib/upgrade/keep.d/ffwizard3 b/packages/falter-common/files/lib/upgrade/keep.d/ffwizard3 similarity index 100% rename from packages/falter-common/files-common/lib/upgrade/keep.d/ffwizard3 rename to packages/falter-common/files/lib/upgrade/keep.d/ffwizard3 diff --git a/packages/falter-common/files-common/sbin/ffwizard2uci b/packages/falter-common/files/sbin/ffwizard2uci similarity index 100% rename from packages/falter-common/files-common/sbin/ffwizard2uci rename to packages/falter-common/files/sbin/ffwizard2uci diff --git a/packages/falter-common/files-common/sbin/uci2ffwizard b/packages/falter-common/files/sbin/uci2ffwizard similarity index 100% rename from packages/falter-common/files-common/sbin/uci2ffwizard rename to packages/falter-common/files/sbin/uci2ffwizard diff --git a/packages/falter-common/files-common/usr/bin/ffdzero b/packages/falter-common/files/usr/bin/ffdzero similarity index 100% rename from packages/falter-common/files-common/usr/bin/ffdzero rename to packages/falter-common/files/usr/bin/ffdzero diff --git a/packages/falter-common/files-olsrv1/usr/bin/hna.lua b/packages/falter-common/files/usr/bin/hna.lua similarity index 100% rename from packages/falter-common/files-olsrv1/usr/bin/hna.lua rename to packages/falter-common/files/usr/bin/hna.lua diff --git a/packages/falter-common/files-common/usr/bin/watch.sh b/packages/falter-common/files/usr/bin/watch.sh similarity index 100% rename from packages/falter-common/files-common/usr/bin/watch.sh rename to packages/falter-common/files/usr/bin/watch.sh From 792c381970695b15e01159273e3c2a0ccb23e373 Mon Sep 17 00:00:00 2001 From: Packet Please Date: Mon, 5 Jun 2023 01:17:39 +0200 Subject: [PATCH 4/6] packages: merge lib-guard into falter-common Signed-off-by: Packet Please --- packages/falter-berlin-dhcp-defaults/Makefile | 2 +- .../falter-berlin-firewall-defaults/Makefile | 2 +- packages/falter-berlin-lib-guard/Makefile | 34 ------------------- .../falter-berlin-network-defaults/Makefile | 2 +- .../falter-berlin-olsrd-defaults/Makefile | 2 +- .../Makefile | 2 +- .../falter-berlin-system-defaults/Makefile | 1 - .../falter-berlin-uhttpd-defaults/Makefile | 2 +- .../files/lib/functions/guard.sh | 0 9 files changed, 6 insertions(+), 41 deletions(-) delete mode 100644 packages/falter-berlin-lib-guard/Makefile rename packages/{falter-berlin-lib-guard => falter-common}/files/lib/functions/guard.sh (100%) diff --git a/packages/falter-berlin-dhcp-defaults/Makefile b/packages/falter-berlin-dhcp-defaults/Makefile index bb2b3d94..ca776592 100644 --- a/packages/falter-berlin-dhcp-defaults/Makefile +++ b/packages/falter-berlin-dhcp-defaults/Makefile @@ -10,7 +10,7 @@ define Package/falter-berlin-dhcp-defaults CATEGORY:=falter-berlin TITLE:=Freifunk Berlin dhcp default configuration URL:=https://github.com/freifunk-berlin/falter-packages - EXTRA_DEPENDS:=dnsmasq, falter-berlin-lib-guard + EXTRA_DEPENDS:=dnsmasq PKGARCH:=all endef diff --git a/packages/falter-berlin-firewall-defaults/Makefile b/packages/falter-berlin-firewall-defaults/Makefile index a5e275d9..fd7f357a 100644 --- a/packages/falter-berlin-firewall-defaults/Makefile +++ b/packages/falter-berlin-firewall-defaults/Makefile @@ -10,7 +10,7 @@ define Package/falter-berlin-firewall-defaults CATEGORY:=falter-berlin TITLE:=Freifunk Berlin firewall default configuration URL:=http://github.com/freifunk-berlin/packages_berlin - EXTRA_DEPENDS:=firewall4, falter-berlin-lib-guard + EXTRA_DEPENDS:=firewall4 PKGARCH:=all endef diff --git a/packages/falter-berlin-lib-guard/Makefile b/packages/falter-berlin-lib-guard/Makefile deleted file mode 100644 index caf23f56..00000000 --- a/packages/falter-berlin-lib-guard/Makefile +++ /dev/null @@ -1,34 +0,0 @@ -include $(TOPDIR)/rules.mk - -PKG_NAME:=falter-berlin-lib-guard -PKG_VERSION:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/falter-berlin-lib-guard - SECTION:=falter-berlin - CATEGORY:=falter-berlin - TITLE:=Freifunk Berlin guard function - URL:=https://github.com/freifunk-berlin/falter-packages - PKGARCH:=all -endef - -define Package/falter-berlin-lib-guard/description - Freifunk Berlin guard function -endef - -define Build/Prepare - mkdir -p $(PKG_BUILD_DIR) -endef - -define Build/Configure -endef - -define Build/Compile -endef - -define Package/falter-berlin-lib-guard/install - $(CP) ./files/* $(1)/ -endef - -$(eval $(call BuildPackage,falter-berlin-lib-guard)) diff --git a/packages/falter-berlin-network-defaults/Makefile b/packages/falter-berlin-network-defaults/Makefile index aee87829..11c037a7 100644 --- a/packages/falter-berlin-network-defaults/Makefile +++ b/packages/falter-berlin-network-defaults/Makefile @@ -10,7 +10,7 @@ define Package/falter-berlin-network-defaults CATEGORY:=falter-berlin TITLE:=Freifunk Berlin network default configuration URL:=https://github.com/freifunk-berlin/falter-packages - EXTRA_DEPENDS:=falter-berlin-lib-guard, pingcheck + EXTRA_DEPENDS:=pingcheck PKGARCH:=all endef diff --git a/packages/falter-berlin-olsrd-defaults/Makefile b/packages/falter-berlin-olsrd-defaults/Makefile index 92ea6d11..91620dab 100644 --- a/packages/falter-berlin-olsrd-defaults/Makefile +++ b/packages/falter-berlin-olsrd-defaults/Makefile @@ -10,7 +10,7 @@ define Package/falter-berlin-olsrd-defaults CATEGORY:=falter-berlin TITLE:=Freifunk Berlin olsrd default configuration URL:=https://github.com/freifunk-berlin/falter-packages - EXTRA_DEPENDS+=olsrd, falter-berlin-lib-guard + EXTRA_DEPENDS+=olsrd PKGARCH:=all endef diff --git a/packages/falter-berlin-statistics-defaults/Makefile b/packages/falter-berlin-statistics-defaults/Makefile index 8566ae41..5f41cd90 100644 --- a/packages/falter-berlin-statistics-defaults/Makefile +++ b/packages/falter-berlin-statistics-defaults/Makefile @@ -11,7 +11,7 @@ define Package/falter-berlin-statistics-defaults CATEGORY:=falter-berlin TITLE:=Freifunk Berlin statistics default configuration URL:=https://github.com/freifunk-berlin/falter-packages - EXTRA_DEPENDS:=olsrd-mod-txtinfo, falter-berlin-lib-guard + EXTRA_DEPENDS:=olsrd-mod-txtinfo PKGARCH:=all endef diff --git a/packages/falter-berlin-system-defaults/Makefile b/packages/falter-berlin-system-defaults/Makefile index 39b034fd..e9038723 100644 --- a/packages/falter-berlin-system-defaults/Makefile +++ b/packages/falter-berlin-system-defaults/Makefile @@ -11,7 +11,6 @@ define Package/falter-berlin-system-defaults CATEGORY:=falter-berlin TITLE:=Freifunk Berlin system default configuration URL:=https://github.com/freifunk-berlin/falter-packages - EXTRA_DEPENDS:=falter-berlin-lib-guard PKGARCH:=all endef diff --git a/packages/falter-berlin-uhttpd-defaults/Makefile b/packages/falter-berlin-uhttpd-defaults/Makefile index 1c63299b..150d2e37 100644 --- a/packages/falter-berlin-uhttpd-defaults/Makefile +++ b/packages/falter-berlin-uhttpd-defaults/Makefile @@ -10,7 +10,7 @@ define Package/falter-berlin-uhttpd-defaults CATEGORY:=falter-berlin TITLE:=Freifunk Berlin uhttpd default configuration URL:=https://github.com/freifunk-berlin/falter-packages - EXTRA_DEPENDS:=uhttpd, falter-berlin-lib-guard + EXTRA_DEPENDS:=uhttpd PKGARCH:=all endef diff --git a/packages/falter-berlin-lib-guard/files/lib/functions/guard.sh b/packages/falter-common/files/lib/functions/guard.sh similarity index 100% rename from packages/falter-berlin-lib-guard/files/lib/functions/guard.sh rename to packages/falter-common/files/lib/functions/guard.sh From dc14f70d175d113a10c067cd394a47a12af9ee8d Mon Sep 17 00:00:00 2001 From: Packet Please Date: Wed, 7 Jun 2023 16:11:13 +0200 Subject: [PATCH 5/6] packages: merge defaults packages into falter-common Signed-off-by: Packet Please --- packages/falter-berlin-dhcp-defaults/Makefile | 38 ---------------- .../falter-berlin-freifunk-defaults/Makefile | 36 --------------- .../falter-berlin-network-defaults/Makefile | 44 ------------------- .../falter-berlin-olsrd-defaults/Makefile | 36 --------------- .../Makefile | 37 ---------------- .../falter-berlin-system-defaults/Makefile | 36 --------------- .../falter-berlin-uhttpd-defaults/Makefile | 36 --------------- .../hotplug.d/iface/60-ffuplink_policyrouting | 0 .../files/etc/init.d/ff_dnsmasq_reload | 0 .../etc}/pingcheck/offline.d/60-freifunk-wan | 0 .../etc}/pingcheck/online.d/60-freifunk-wan | 0 .../freifunk-berlin-correct-nsm2-txpower | 0 .../freifunk-berlin-dhcp-defaults | 0 .../freifunk-berlin-ffuplink-defaults | 0 .../freifunk-berlin-freifunk-defaults | 0 .../freifunk-berlin-network-defaults | 0 .../freifunk-berlin-network-ip-route | 0 .../freifunk-berlin-olsrd-defaults | 0 .../freifunk-berlin-pingcheck-defaults | 0 .../freifunk-berlin-statistics-defaults | 0 .../freifunk-berlin-system-defaults | 0 .../freifunk-berlin-uhttpd-defaults | 0 .../freifunk-berlin-wireless-defaults | 0 .../lib/functions/freifunk-berlin-network.sh | 0 24 files changed, 263 deletions(-) delete mode 100644 packages/falter-berlin-dhcp-defaults/Makefile delete mode 100644 packages/falter-berlin-freifunk-defaults/Makefile delete mode 100644 packages/falter-berlin-network-defaults/Makefile delete mode 100644 packages/falter-berlin-olsrd-defaults/Makefile delete mode 100644 packages/falter-berlin-statistics-defaults/Makefile delete mode 100644 packages/falter-berlin-system-defaults/Makefile delete mode 100644 packages/falter-berlin-uhttpd-defaults/Makefile rename packages/{falter-berlin-network-defaults => falter-common/files/etc}/hotplug.d/iface/60-ffuplink_policyrouting (100%) rename packages/{falter-berlin-dhcp-defaults => falter-common}/files/etc/init.d/ff_dnsmasq_reload (100%) rename packages/{falter-berlin-network-defaults => falter-common/files/etc}/pingcheck/offline.d/60-freifunk-wan (100%) rename packages/{falter-berlin-network-defaults => falter-common/files/etc}/pingcheck/online.d/60-freifunk-wan (100%) rename packages/{falter-berlin-network-defaults => falter-common/files/etc}/uci-defaults/freifunk-berlin-correct-nsm2-txpower (100%) rename packages/{falter-berlin-dhcp-defaults => falter-common/files/etc}/uci-defaults/freifunk-berlin-dhcp-defaults (100%) rename packages/{falter-berlin-network-defaults => falter-common/files/etc}/uci-defaults/freifunk-berlin-ffuplink-defaults (100%) rename packages/{falter-berlin-freifunk-defaults => falter-common/files/etc}/uci-defaults/freifunk-berlin-freifunk-defaults (100%) rename packages/{falter-berlin-network-defaults => falter-common/files/etc}/uci-defaults/freifunk-berlin-network-defaults (100%) rename packages/{falter-berlin-network-defaults => falter-common/files/etc}/uci-defaults/freifunk-berlin-network-ip-route (100%) rename packages/{falter-berlin-olsrd-defaults => falter-common/files/etc}/uci-defaults/freifunk-berlin-olsrd-defaults (100%) rename packages/{falter-berlin-network-defaults => falter-common/files/etc}/uci-defaults/freifunk-berlin-pingcheck-defaults (100%) rename packages/{falter-berlin-statistics-defaults => falter-common/files/etc}/uci-defaults/freifunk-berlin-statistics-defaults (100%) rename packages/{falter-berlin-system-defaults => falter-common/files/etc}/uci-defaults/freifunk-berlin-system-defaults (100%) rename packages/{falter-berlin-uhttpd-defaults => falter-common/files/etc}/uci-defaults/freifunk-berlin-uhttpd-defaults (100%) rename packages/{falter-berlin-network-defaults => falter-common/files/etc}/uci-defaults/freifunk-berlin-wireless-defaults (100%) rename packages/{falter-berlin-network-defaults => falter-common/files}/lib/functions/freifunk-berlin-network.sh (100%) diff --git a/packages/falter-berlin-dhcp-defaults/Makefile b/packages/falter-berlin-dhcp-defaults/Makefile deleted file mode 100644 index ca776592..00000000 --- a/packages/falter-berlin-dhcp-defaults/Makefile +++ /dev/null @@ -1,38 +0,0 @@ -include $(TOPDIR)/rules.mk - -PKG_NAME:=falter-berlin-dhcp-defaults -PKG_VERSION:=2 - -include $(INCLUDE_DIR)/package.mk - -define Package/falter-berlin-dhcp-defaults - SECTION:=falter-berlin - CATEGORY:=falter-berlin - TITLE:=Freifunk Berlin dhcp default configuration - URL:=https://github.com/freifunk-berlin/falter-packages - EXTRA_DEPENDS:=dnsmasq - PKGARCH:=all -endef - -define Package/falter-berlin-dhcp-defaults/description - Freifunk Berlin configuration files for dhcp -endef - -define Build/Prepare - mkdir -p $(PKG_BUILD_DIR) -endef - -define Build/Configure -endef - -define Build/Compile -endef - -define Package/falter-berlin-dhcp-defaults/install - $(INSTALL_DIR) $(1)/etc/uci-defaults - $(CP) ./uci-defaults/* $(1)/etc/uci-defaults - $(CP) ./files/* $(1)/ -endef - -$(eval $(call BuildPackage,falter-berlin-dhcp-defaults)) - diff --git a/packages/falter-berlin-freifunk-defaults/Makefile b/packages/falter-berlin-freifunk-defaults/Makefile deleted file mode 100644 index 00b1be18..00000000 --- a/packages/falter-berlin-freifunk-defaults/Makefile +++ /dev/null @@ -1,36 +0,0 @@ -include $(TOPDIR)/rules.mk - -PKG_NAME:=falter-berlin-freifunk-defaults -PKG_SOURCE_DATE:=2019-05-25 -PKG_VERSION:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/falter-berlin-freifunk-defaults - SECTION:=falter-berlin - CATEGORY:=falter-berlin - TITLE:=Freifunk Berlin freifunk default configuration - URL:=https://github.com/freifunk-berlin/falter-packages - PKGARCH:=all -endef - -define Package/falter-berlin-freifunk-defaults/description - Freifunk Berlin configuration files for freifunk -endef - -define Build/Prepare - mkdir -p $(PKG_BUILD_DIR) -endef - -define Build/Configure -endef - -define Build/Compile -endef - -define Package/falter-berlin-freifunk-defaults/install - $(INSTALL_DIR) $(1)/etc/uci-defaults - $(CP) ./uci-defaults/* $(1)/etc/uci-defaults -endef - -$(eval $(call BuildPackage,falter-berlin-freifunk-defaults)) diff --git a/packages/falter-berlin-network-defaults/Makefile b/packages/falter-berlin-network-defaults/Makefile deleted file mode 100644 index 11c037a7..00000000 --- a/packages/falter-berlin-network-defaults/Makefile +++ /dev/null @@ -1,44 +0,0 @@ -include $(TOPDIR)/rules.mk - -PKG_NAME:=falter-berlin-network-defaults -PKG_VERSION:=4 - -include $(INCLUDE_DIR)/package.mk - -define Package/falter-berlin-network-defaults - SECTION:=falter-berlin - CATEGORY:=falter-berlin - TITLE:=Freifunk Berlin network default configuration - URL:=https://github.com/freifunk-berlin/falter-packages - EXTRA_DEPENDS:=pingcheck - PKGARCH:=all -endef - -define Package/falter-berlin-network-defaults/description - Freifunk Berlin configuration files for network -endef - -define Build/Prepare - mkdir -p $(PKG_BUILD_DIR) -endef - -define Build/Configure -endef - -define Build/Compile -endef - -define Package/falter-berlin-network-defaults/install - $(INSTALL_DIR) $(1)/etc/uci-defaults - $(CP) ./uci-defaults/* $(1)/etc/uci-defaults - $(INSTALL_DIR) $(1)/etc/hotplug.d/iface - $(CP) ./hotplug.d/iface/* $(1)/etc/hotplug.d/iface/ - $(INSTALL_DIR) $(1)/lib/functions - $(CP) ./lib/functions/* $(1)/lib/functions/ - $(INSTALL_DIR) $(1)/etc/pingcheck/online.d - $(CP) ./pingcheck/online.d/* $(1)/etc/pingcheck/online.d/ - $(INSTALL_DIR) $(1)/etc/pingcheck/offline.d - $(CP) ./pingcheck/offline.d/* $(1)/etc/pingcheck/offline.d/ -endef - -$(eval $(call BuildPackage,falter-berlin-network-defaults)) diff --git a/packages/falter-berlin-olsrd-defaults/Makefile b/packages/falter-berlin-olsrd-defaults/Makefile deleted file mode 100644 index 91620dab..00000000 --- a/packages/falter-berlin-olsrd-defaults/Makefile +++ /dev/null @@ -1,36 +0,0 @@ -include $(TOPDIR)/rules.mk - -PKG_NAME:=falter-berlin-olsrd-defaults -PKG_VERSION:=2 - -include $(INCLUDE_DIR)/package.mk - -define Package/falter-berlin-olsrd-defaults - SECTION:=falter-berlin - CATEGORY:=falter-berlin - TITLE:=Freifunk Berlin olsrd default configuration - URL:=https://github.com/freifunk-berlin/falter-packages - EXTRA_DEPENDS+=olsrd - PKGARCH:=all -endef - -define Package/falter-berlin-olsrd-defaults/description - Freifunk Berlin configuration files for olsrd and olsrd6 -endef - -define Build/Prepare - mkdir -p $(PKG_BUILD_DIR) -endef - -define Build/Configure -endef - -define Build/Compile -endef - -define Package/falter-berlin-olsrd-defaults/install - $(INSTALL_DIR) $(1)/etc/uci-defaults - $(CP) ./uci-defaults/* $(1)/etc/uci-defaults -endef - -$(eval $(call BuildPackage,falter-berlin-olsrd-defaults)) diff --git a/packages/falter-berlin-statistics-defaults/Makefile b/packages/falter-berlin-statistics-defaults/Makefile deleted file mode 100644 index 5f41cd90..00000000 --- a/packages/falter-berlin-statistics-defaults/Makefile +++ /dev/null @@ -1,37 +0,0 @@ -include $(TOPDIR)/rules.mk - -PKG_NAME:=falter-berlin-statistics-defaults -PKG_SOURCE_DATE:=2020-04-01 -PKG_VERSION:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/falter-berlin-statistics-defaults - SECTION:=falter-berlin - CATEGORY:=falter-berlin - TITLE:=Freifunk Berlin statistics default configuration - URL:=https://github.com/freifunk-berlin/falter-packages - EXTRA_DEPENDS:=olsrd-mod-txtinfo - PKGARCH:=all -endef - -define Package/falter-berlin-statistics-defaults/description - Freifunk Berlin configuration files for statistics -endef - -define Build/Prepare - mkdir -p $(PKG_BUILD_DIR) -endef - -define Build/Configure -endef - -define Build/Compile -endef - -define Package/falter-berlin-statistics-defaults/install - $(INSTALL_DIR) $(1)/etc/uci-defaults - $(CP) ./uci-defaults/* $(1)/etc/uci-defaults -endef - -$(eval $(call BuildPackage,falter-berlin-statistics-defaults)) diff --git a/packages/falter-berlin-system-defaults/Makefile b/packages/falter-berlin-system-defaults/Makefile deleted file mode 100644 index e9038723..00000000 --- a/packages/falter-berlin-system-defaults/Makefile +++ /dev/null @@ -1,36 +0,0 @@ -include $(TOPDIR)/rules.mk - -PKG_NAME:=falter-berlin-system-defaults -PKG_SOURCE_DATE:=2020-03-01 -PKG_VERSION:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/falter-berlin-system-defaults - SECTION:=falter-berlin - CATEGORY:=falter-berlin - TITLE:=Freifunk Berlin system default configuration - URL:=https://github.com/freifunk-berlin/falter-packages - PKGARCH:=all -endef - -define Package/falter-berlin-system-defaults/description - Freifunk Berlin configuration files for basic system-files -endef - -define Build/Prepare - mkdir -p $(PKG_BUILD_DIR) -endef - -define Build/Configure -endef - -define Build/Compile -endef - -define Package/falter-berlin-system-defaults/install - $(INSTALL_DIR) $(1)/etc/uci-defaults - $(CP) ./uci-defaults/* $(1)/etc/uci-defaults -endef - -$(eval $(call BuildPackage,falter-berlin-system-defaults)) diff --git a/packages/falter-berlin-uhttpd-defaults/Makefile b/packages/falter-berlin-uhttpd-defaults/Makefile deleted file mode 100644 index 150d2e37..00000000 --- a/packages/falter-berlin-uhttpd-defaults/Makefile +++ /dev/null @@ -1,36 +0,0 @@ -include $(TOPDIR)/rules.mk - -PKG_NAME:=falter-berlin-uhttpd-defaults -PKG_VERSION:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/falter-berlin-uhttpd-defaults - SECTION:=falter-berlin - CATEGORY:=falter-berlin - TITLE:=Freifunk Berlin uhttpd default configuration - URL:=https://github.com/freifunk-berlin/falter-packages - EXTRA_DEPENDS:=uhttpd - PKGARCH:=all -endef - -define Package/falter-berlin-uhttpd-defaults/description - Freifunk Berlin configuration files for uhttpd -endef - -define Build/Prepare - mkdir -p $(PKG_BUILD_DIR) -endef - -define Build/Configure -endef - -define Build/Compile -endef - -define Package/falter-berlin-uhttpd-defaults/install - $(INSTALL_DIR) $(1)/etc/uci-defaults - $(CP) ./uci-defaults/* $(1)/etc/uci-defaults -endef - -$(eval $(call BuildPackage,falter-berlin-uhttpd-defaults)) diff --git a/packages/falter-berlin-network-defaults/hotplug.d/iface/60-ffuplink_policyrouting b/packages/falter-common/files/etc/hotplug.d/iface/60-ffuplink_policyrouting similarity index 100% rename from packages/falter-berlin-network-defaults/hotplug.d/iface/60-ffuplink_policyrouting rename to packages/falter-common/files/etc/hotplug.d/iface/60-ffuplink_policyrouting diff --git a/packages/falter-berlin-dhcp-defaults/files/etc/init.d/ff_dnsmasq_reload b/packages/falter-common/files/etc/init.d/ff_dnsmasq_reload similarity index 100% rename from packages/falter-berlin-dhcp-defaults/files/etc/init.d/ff_dnsmasq_reload rename to packages/falter-common/files/etc/init.d/ff_dnsmasq_reload diff --git a/packages/falter-berlin-network-defaults/pingcheck/offline.d/60-freifunk-wan b/packages/falter-common/files/etc/pingcheck/offline.d/60-freifunk-wan similarity index 100% rename from packages/falter-berlin-network-defaults/pingcheck/offline.d/60-freifunk-wan rename to packages/falter-common/files/etc/pingcheck/offline.d/60-freifunk-wan diff --git a/packages/falter-berlin-network-defaults/pingcheck/online.d/60-freifunk-wan b/packages/falter-common/files/etc/pingcheck/online.d/60-freifunk-wan similarity index 100% rename from packages/falter-berlin-network-defaults/pingcheck/online.d/60-freifunk-wan rename to packages/falter-common/files/etc/pingcheck/online.d/60-freifunk-wan diff --git a/packages/falter-berlin-network-defaults/uci-defaults/freifunk-berlin-correct-nsm2-txpower b/packages/falter-common/files/etc/uci-defaults/freifunk-berlin-correct-nsm2-txpower similarity index 100% rename from packages/falter-berlin-network-defaults/uci-defaults/freifunk-berlin-correct-nsm2-txpower rename to packages/falter-common/files/etc/uci-defaults/freifunk-berlin-correct-nsm2-txpower diff --git a/packages/falter-berlin-dhcp-defaults/uci-defaults/freifunk-berlin-dhcp-defaults b/packages/falter-common/files/etc/uci-defaults/freifunk-berlin-dhcp-defaults similarity index 100% rename from packages/falter-berlin-dhcp-defaults/uci-defaults/freifunk-berlin-dhcp-defaults rename to packages/falter-common/files/etc/uci-defaults/freifunk-berlin-dhcp-defaults diff --git a/packages/falter-berlin-network-defaults/uci-defaults/freifunk-berlin-ffuplink-defaults b/packages/falter-common/files/etc/uci-defaults/freifunk-berlin-ffuplink-defaults similarity index 100% rename from packages/falter-berlin-network-defaults/uci-defaults/freifunk-berlin-ffuplink-defaults rename to packages/falter-common/files/etc/uci-defaults/freifunk-berlin-ffuplink-defaults diff --git a/packages/falter-berlin-freifunk-defaults/uci-defaults/freifunk-berlin-freifunk-defaults b/packages/falter-common/files/etc/uci-defaults/freifunk-berlin-freifunk-defaults similarity index 100% rename from packages/falter-berlin-freifunk-defaults/uci-defaults/freifunk-berlin-freifunk-defaults rename to packages/falter-common/files/etc/uci-defaults/freifunk-berlin-freifunk-defaults diff --git a/packages/falter-berlin-network-defaults/uci-defaults/freifunk-berlin-network-defaults b/packages/falter-common/files/etc/uci-defaults/freifunk-berlin-network-defaults similarity index 100% rename from packages/falter-berlin-network-defaults/uci-defaults/freifunk-berlin-network-defaults rename to packages/falter-common/files/etc/uci-defaults/freifunk-berlin-network-defaults diff --git a/packages/falter-berlin-network-defaults/uci-defaults/freifunk-berlin-network-ip-route b/packages/falter-common/files/etc/uci-defaults/freifunk-berlin-network-ip-route similarity index 100% rename from packages/falter-berlin-network-defaults/uci-defaults/freifunk-berlin-network-ip-route rename to packages/falter-common/files/etc/uci-defaults/freifunk-berlin-network-ip-route diff --git a/packages/falter-berlin-olsrd-defaults/uci-defaults/freifunk-berlin-olsrd-defaults b/packages/falter-common/files/etc/uci-defaults/freifunk-berlin-olsrd-defaults similarity index 100% rename from packages/falter-berlin-olsrd-defaults/uci-defaults/freifunk-berlin-olsrd-defaults rename to packages/falter-common/files/etc/uci-defaults/freifunk-berlin-olsrd-defaults diff --git a/packages/falter-berlin-network-defaults/uci-defaults/freifunk-berlin-pingcheck-defaults b/packages/falter-common/files/etc/uci-defaults/freifunk-berlin-pingcheck-defaults similarity index 100% rename from packages/falter-berlin-network-defaults/uci-defaults/freifunk-berlin-pingcheck-defaults rename to packages/falter-common/files/etc/uci-defaults/freifunk-berlin-pingcheck-defaults diff --git a/packages/falter-berlin-statistics-defaults/uci-defaults/freifunk-berlin-statistics-defaults b/packages/falter-common/files/etc/uci-defaults/freifunk-berlin-statistics-defaults similarity index 100% rename from packages/falter-berlin-statistics-defaults/uci-defaults/freifunk-berlin-statistics-defaults rename to packages/falter-common/files/etc/uci-defaults/freifunk-berlin-statistics-defaults diff --git a/packages/falter-berlin-system-defaults/uci-defaults/freifunk-berlin-system-defaults b/packages/falter-common/files/etc/uci-defaults/freifunk-berlin-system-defaults similarity index 100% rename from packages/falter-berlin-system-defaults/uci-defaults/freifunk-berlin-system-defaults rename to packages/falter-common/files/etc/uci-defaults/freifunk-berlin-system-defaults diff --git a/packages/falter-berlin-uhttpd-defaults/uci-defaults/freifunk-berlin-uhttpd-defaults b/packages/falter-common/files/etc/uci-defaults/freifunk-berlin-uhttpd-defaults similarity index 100% rename from packages/falter-berlin-uhttpd-defaults/uci-defaults/freifunk-berlin-uhttpd-defaults rename to packages/falter-common/files/etc/uci-defaults/freifunk-berlin-uhttpd-defaults diff --git a/packages/falter-berlin-network-defaults/uci-defaults/freifunk-berlin-wireless-defaults b/packages/falter-common/files/etc/uci-defaults/freifunk-berlin-wireless-defaults similarity index 100% rename from packages/falter-berlin-network-defaults/uci-defaults/freifunk-berlin-wireless-defaults rename to packages/falter-common/files/etc/uci-defaults/freifunk-berlin-wireless-defaults diff --git a/packages/falter-berlin-network-defaults/lib/functions/freifunk-berlin-network.sh b/packages/falter-common/files/lib/functions/freifunk-berlin-network.sh similarity index 100% rename from packages/falter-berlin-network-defaults/lib/functions/freifunk-berlin-network.sh rename to packages/falter-common/files/lib/functions/freifunk-berlin-network.sh From b26a7724e1ea7e3c2b30ec10ebe6b97d2a3106dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20H=C3=BCbner?= Date: Sat, 10 Jun 2023 12:36:07 +0200 Subject: [PATCH 6/6] falter-common: apply shellcheck-fixes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit exclude hna.lua from linter. Signed-off-by: Martin Hübner --- .github/workflows/linter.yml | 1 + .../hotplug.d/iface/60-ffuplink_policyrouting | 17 +++--- .../files/etc/init.d/ff_dnsmasq_reload | 3 +- .../falter-common/files/etc/init.d/freifunk | 3 ++ .../files/etc/profile.d/10_dynbanner.sh | 7 ++- .../freifunk-berlin-correct-nsm2-txpower | 13 +++-- .../freifunk-berlin-dhcp-defaults | 6 ++- .../freifunk-berlin-ffuplink-defaults | 4 +- .../freifunk-berlin-network-defaults | 17 +++--- .../freifunk-berlin-network-ip-route | 2 + .../freifunk-berlin-olsrd-defaults | 3 ++ .../freifunk-berlin-pingcheck-defaults | 3 +- .../freifunk-berlin-statistics-defaults | 9 ++-- .../freifunk-berlin-system-defaults | 4 +- .../freifunk-berlin-uhttpd-defaults | 2 + .../freifunk-berlin-wireless-defaults | 3 ++ .../lib/functions/freifunk-berlin-network.sh | 52 ++++++++++--------- .../files/lib/functions/guard.sh | 12 ++--- packages/falter-common/files/usr/bin/ffdzero | 8 +-- packages/falter-common/files/usr/bin/hna.lua | 2 +- packages/falter-common/files/usr/bin/watch.sh | 4 +- 21 files changed, 111 insertions(+), 64 deletions(-) diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index 580576dc..ccb1d898 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -58,3 +58,4 @@ jobs: # Change to 'master' if your main branch differs DEFAULT_BRANCH: master GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + FILTER_REGEX_EXCLUDE: ".*/usr/bin/hna\\.lua$" diff --git a/packages/falter-common/files/etc/hotplug.d/iface/60-ffuplink_policyrouting b/packages/falter-common/files/etc/hotplug.d/iface/60-ffuplink_policyrouting index 2aaf2f82..ba685ccf 100755 --- a/packages/falter-common/files/etc/hotplug.d/iface/60-ffuplink_policyrouting +++ b/packages/falter-common/files/etc/hotplug.d/iface/60-ffuplink_policyrouting @@ -1,5 +1,8 @@ #!/bin/sh +# shellcheck disable=SC1091 +# shellcheck disable=SC2154 + . /lib/functions.sh . /lib/functions/network.sh @@ -19,20 +22,20 @@ config_get zones pr zones if [ "$ACTION" = ifup ]; then logger -t ff-userlog "ffuplink interface is up" logger -t ff-userlog "creating ffuplink ip-rules" - ifaces=$(uci -q get firewall.zone_freifunk.network) + ifaces=$(uci -q get firewall.zone_freifunk.network) network_get_subnet uplink_net ffuplink - if [ -z $uplink_net ]; then + if [ -z "$uplink_net" ]; then logger -t ff-userlog "UCI did not return a valid IP-net for ffuplink; querying directly with ip-tool" uplink_net=$(ip -4 -o addr show dev ffuplink|awk '{print $4}') fi - if [ -z $uplink_net ]; then + if [ -z "$uplink_net" ]; then logger -t ff-userlog "no valid IP-net found for ffuplink; TRAFFIC FOR UPLINK-NETWORK WILL NOT BE BLOCKED" fi - eval $(/bin/ipcalc.sh $uplink_net) + eval "$(/bin/ipcalc.sh "$uplink_net")" for iface in $ifaces; do - network_get_physdev netdev $iface - [ ! '0.0.0.0' = $NETWORK ] && ip rule add prio 19989 to $NETWORK/$PREFIX iif $netdev prohibit - ip rule add prio 19990 iif $netdev lookup ffuplink + network_get_physdev netdev "$iface" + [ ! '0.0.0.0' = "$NETWORK" ] && ip rule add prio 19989 to "$NETWORK/$PREFIX" iif "$netdev" prohibit + ip rule add prio 19990 iif "$netdev" lookup ffuplink done logger -t ff-userlog "ffuplink-interface is setup" fi diff --git a/packages/falter-common/files/etc/init.d/ff_dnsmasq_reload b/packages/falter-common/files/etc/init.d/ff_dnsmasq_reload index 95a31215..780041c0 100755 --- a/packages/falter-common/files/etc/init.d/ff_dnsmasq_reload +++ b/packages/falter-common/files/etc/init.d/ff_dnsmasq_reload @@ -1,5 +1,7 @@ #!/bin/sh /etc/rc.common +# shellcheck disable=SC2034 + START=88 boot() { @@ -11,4 +13,3 @@ boot() { /etc/init.d/cron restart & } - diff --git a/packages/falter-common/files/etc/init.d/freifunk b/packages/falter-common/files/etc/init.d/freifunk index 8ff3138b..524223c3 100755 --- a/packages/falter-common/files/etc/init.d/freifunk +++ b/packages/falter-common/files/etc/init.d/freifunk @@ -2,6 +2,9 @@ # Freifunk Init # $Id$ +# shellcheck disable=SC2034 +# shellcheck disable=SC1090 + START=99 boot() { diff --git a/packages/falter-common/files/etc/profile.d/10_dynbanner.sh b/packages/falter-common/files/etc/profile.d/10_dynbanner.sh index c277851b..c9b1eb77 100755 --- a/packages/falter-common/files/etc/profile.d/10_dynbanner.sh +++ b/packages/falter-common/files/etc/profile.d/10_dynbanner.sh @@ -1,12 +1,17 @@ #!/bin/sh +# shellcheck shell=bash +# shellcheck disable=SC2059 + # Get dynamic information and print them under the banner. +# +# This script originates from Freifunk Berlin HOSTNAME=$(uci -q get system.@system[0].hostname)".olsr" IPADDR=$(uci -q get network.dhcp.ipaddr) UPTIME=$(uptime | cut -d ',' -f 0 | cut -d ' ' -f 4-) 2&> /dev/null FREEFL=$(df -h | grep " /overlay" | sed -E -e s/[[:space:]]+/\;/g | cut -d';' -f4 ) 2&> /dev/null -SYS_LOAD=$(cat /proc/loadavg | cut -d' ' -f 1-3) 2&> /dev/null +SYS_LOAD=$(cut -d' ' -f 1-3 < /proc/loadavg ) 2&> /dev/null CLIENTS=$(wc -l /tmp/dhcp.leases | cut -d' ' -f1) 2&> /dev/null printf \ diff --git a/packages/falter-common/files/etc/uci-defaults/freifunk-berlin-correct-nsm2-txpower b/packages/falter-common/files/etc/uci-defaults/freifunk-berlin-correct-nsm2-txpower index edd0c2b1..cb3f03f2 100644 --- a/packages/falter-common/files/etc/uci-defaults/freifunk-berlin-correct-nsm2-txpower +++ b/packages/falter-common/files/etc/uci-defaults/freifunk-berlin-correct-nsm2-txpower @@ -4,15 +4,20 @@ # see https://github.com/freifunk-berlin/firmware/issues/381 # -[ ! $(command -v iwinfo) ] && exit 0 +# shellcheck shell=dash +# shellcheck disable=SC2181 +# shellcheck disable=SC1091 + +[ ! "$(command -v iwinfo)" ] && exit 0 iwinfo|grep -q 'NanoStation M2\|NanoStation Loco M2' || exit 0 + . /lib/functions/guard.sh guard "NSm2_txpower" set_default_txpower() { echo "setting txpower value to $1 dBm" - uci set wireless.radio0.txpower=$1 + uci set wireless.radio0.txpower="$1" uci commit wireless } @@ -20,13 +25,13 @@ MAX_TX_2G=20 # get "TX offset" of 1st interface, if this is unknown set it to 0dB # then only return the numerical value ANT_GAIN=$(iwinfo |grep -m 1 "TX power offset:" |sed -e "s/unknown/0 dB/" |tr -dc '0-9') -NEW_TX=$(echo $(($MAX_TX_2G - $ANT_GAIN))) +NEW_TX=$((MAX_TX_2G - ANT_GAIN)) CURR_TX=$(uci -q get wireless.radio0.txpower) # check if txpower is defined in config if [ $? -ne 0 ]; then echo -n "txpower not defined - " set_default_txpower $NEW_TX -elif [ $CURR_TX -gt $NEW_TX ]; then +elif [ "$CURR_TX" -gt $NEW_TX ]; then set_default_txpower $NEW_TX fi diff --git a/packages/falter-common/files/etc/uci-defaults/freifunk-berlin-dhcp-defaults b/packages/falter-common/files/etc/uci-defaults/freifunk-berlin-dhcp-defaults index 307ab618..38f4efce 100644 --- a/packages/falter-common/files/etc/uci-defaults/freifunk-berlin-dhcp-defaults +++ b/packages/falter-common/files/etc/uci-defaults/freifunk-berlin-dhcp-defaults @@ -1,5 +1,7 @@ #!/bin/sh +# shellcheck disable=SC1091 + . /lib/functions/guard.sh guard "dhcp" @@ -11,7 +13,7 @@ uci set dhcp.@dnsmasq[0].quietdhcp=1 uci add_list dhcp.@dnsmasq[0].notinterface='wan' # on IPv6-islands we also should give a default-route to the clients, -# so they can also reach IPv6-neighbours. +# so they can also reach IPv6-neighbours. uci set dhcp.lan.ra_default=1 # add dns entry frei.funk @@ -23,7 +25,7 @@ uci set dhcp.frei_funk.ip=192.168.42.1 router_ula=$(uci get network.globals.ula_prefix | sed -e 's/\/48/1/') uci set dhcp.frei_funk_ipv6=domain uci set dhcp.frei_funk_ipv6.name=frei.funk -uci set dhcp.frei_funk_ipv6.ip=$router_ula +uci set dhcp.frei_funk_ipv6.ip="$router_ula" # don't send default-route to clients to prevent them sending pakets # to us, that we can't forward now diff --git a/packages/falter-common/files/etc/uci-defaults/freifunk-berlin-ffuplink-defaults b/packages/falter-common/files/etc/uci-defaults/freifunk-berlin-ffuplink-defaults index b9c601ee..a4e46ccf 100644 --- a/packages/falter-common/files/etc/uci-defaults/freifunk-berlin-ffuplink-defaults +++ b/packages/falter-common/files/etc/uci-defaults/freifunk-berlin-ffuplink-defaults @@ -1,5 +1,8 @@ #!/bin/sh +# shellcheck disable=SC1091 + + . /lib/functions/freifunk-berlin-network.sh . /lib/functions/guard.sh guard "ffberlin_uplink" @@ -17,4 +20,3 @@ uci commit ffberlin-uplink create_ffuplink uci set network.ffuplink.disabled=1 uci commit network.ffuplink - diff --git a/packages/falter-common/files/etc/uci-defaults/freifunk-berlin-network-defaults b/packages/falter-common/files/etc/uci-defaults/freifunk-berlin-network-defaults index 1024e9c0..ab2300a4 100644 --- a/packages/falter-common/files/etc/uci-defaults/freifunk-berlin-network-defaults +++ b/packages/falter-common/files/etc/uci-defaults/freifunk-berlin-network-defaults @@ -1,5 +1,8 @@ #!/bin/sh +# shellcheck disable=SC1091 + + . /lib/functions/guard.sh guard "network" @@ -7,7 +10,7 @@ guard "network" uci set network.lan.ipaddr=192.168.42.1 WANDEV=$(uci -q get network.wan.device) -echo ${WANDEV} | grep ^br- > /dev/null +echo "$WANDEV" | grep ^br- > /dev/null BRIDGECHECK=$? # setup wan as a bridge @@ -17,8 +20,8 @@ if [ "X${WANDEV}X" = "XX" ]; then # port device from the client network to wan. This is also needed # in the case where the user decides to use the "notunnel" variant NEWDEV=$(uci add network device) - uci set network.$NEWDEV.type="bridge" - uci set network.$NEWDEV.name="br-wan" + uci set "network.$NEWDEV.type=bridge" + uci set "network.$NEWDEV.name=br-wan" # create a wan interface, even if it can't do anything uci set network.wan=interface @@ -37,15 +40,15 @@ elif [ $BRIDGECHECK = "0" ]; then else # The wan device is not a bridge. Change it to a bridge NEWDEV=$(uci add network device) - uci set network.$NEWDEV.type="bridge" - uci set network.$NEWDEV.name="br-wan" - uci add_list network.$NEWDEV.ports=${WANDEV} + uci set "network.$NEWDEV.type=bridge" + uci set "network.$NEWDEV.name=br-wan" + uci add_list "network.$NEWDEV.ports=$WANDEV" uci set network.wan.device="br-wan" uci set network.wan6.device="br-wan" fi -# do not use dns servers provided by dhcp - we maintain a static list of +# do not use dns servers provided by dhcp - we maintain a static list of # dns servers instead uci set network.wan.peerdns=0 uci set network.wan6.peerdns=0 diff --git a/packages/falter-common/files/etc/uci-defaults/freifunk-berlin-network-ip-route b/packages/falter-common/files/etc/uci-defaults/freifunk-berlin-network-ip-route index 681849df..3739343d 100644 --- a/packages/falter-common/files/etc/uci-defaults/freifunk-berlin-network-ip-route +++ b/packages/falter-common/files/etc/uci-defaults/freifunk-berlin-network-ip-route @@ -1,5 +1,7 @@ #!/bin/sh +# shellcheck disable=SC1091 + . /lib/functions/guard.sh guard "iproute" diff --git a/packages/falter-common/files/etc/uci-defaults/freifunk-berlin-olsrd-defaults b/packages/falter-common/files/etc/uci-defaults/freifunk-berlin-olsrd-defaults index 438b7122..7febba76 100644 --- a/packages/falter-common/files/etc/uci-defaults/freifunk-berlin-olsrd-defaults +++ b/packages/falter-common/files/etc/uci-defaults/freifunk-berlin-olsrd-defaults @@ -1,5 +1,8 @@ #!/bin/sh +# shellcheck disable=SC1091 +# shellcheck disable=SC2086 + . /lib/functions/guard.sh guard "olsrd" diff --git a/packages/falter-common/files/etc/uci-defaults/freifunk-berlin-pingcheck-defaults b/packages/falter-common/files/etc/uci-defaults/freifunk-berlin-pingcheck-defaults index 0e762e20..45d8396e 100644 --- a/packages/falter-common/files/etc/uci-defaults/freifunk-berlin-pingcheck-defaults +++ b/packages/falter-common/files/etc/uci-defaults/freifunk-berlin-pingcheck-defaults @@ -1,5 +1,7 @@ #!/bin/sh +# shellcheck disable=SC1091 + . /lib/functions.sh # remove the sta interface, leaving only wan @@ -12,4 +14,3 @@ uci set pingcheck.@default\[0\].host=livecheck.berlin.freifunk.net uci set pingcheck.@default\[0\].timeout=60 uci commit pingcheck - diff --git a/packages/falter-common/files/etc/uci-defaults/freifunk-berlin-statistics-defaults b/packages/falter-common/files/etc/uci-defaults/freifunk-berlin-statistics-defaults index 96acea6c..ae8758ff 100644 --- a/packages/falter-common/files/etc/uci-defaults/freifunk-berlin-statistics-defaults +++ b/packages/falter-common/files/etc/uci-defaults/freifunk-berlin-statistics-defaults @@ -1,5 +1,8 @@ #!/bin/sh +# shellcheck disable=SC1091 +# shellcheck disable=SC1083 + . /lib/functions/guard.sh guard "luci_statistics" @@ -8,7 +11,7 @@ uci import luci_statistics < /dev/null | hexdump -e '1/1 ":%02x"'` - done + [ -n "$prefix" ] || return + local macaddr + # Create a static macaddr starting with "prefix" for ffuplink devices + # See the website https://www.itwissen.info/MAC-Adresse-MAC-address.html + for byte in 2 3 4 5 6; do + macaddr=$macaddr$(dd if=/dev/urandom bs=1 count=1 2>/dev/null | hexdump -e '1/1 ":%02x"') + done - echo $prefix$macaddr + echo "$prefix$macaddr" } diff --git a/packages/falter-common/files/lib/functions/guard.sh b/packages/falter-common/files/lib/functions/guard.sh index ef407a4d..c97119bd 100644 --- a/packages/falter-common/files/lib/functions/guard.sh +++ b/packages/falter-common/files/lib/functions/guard.sh @@ -10,8 +10,8 @@ guard() { OPTION=$1 [ ! -f $CFG_FILE ] && touch $CFG_FILE && uci set $CFG.$NAME=$SECTION - [ "$(uci -q get $CFG.$NAME.$OPTION)" == "1" ] && exit 0 - uci set $CFG.$NAME.$OPTION=1 + [ "$(uci -q get "$CFG.$NAME.$OPTION")" = "1" ] && exit 0 + uci set "$CFG.$NAME.$OPTION=1" uci commit $CFG } @@ -20,15 +20,15 @@ guard_rename() { DEST=$2 # get current setting or exit when not defined - cur_set=$(uci -q get $CFG.$NAME.$SRC) || return 0 - uci delete $CFG.$NAME.$SRC - uci set $CFG.$NAME.$DEST=$cur_set + cur_set=$(uci -q get "$CFG.$NAME.$SRC") || return 0 + uci delete "$CFG.$NAME.$SRC" + uci set "$CFG.$NAME.$DEST=$cur_set" uci commit $CFG } guard_delete() { OPTION=$1 - uci -q delete $CFG.$NAME.$OPTION || return 0 + uci -q delete "$CFG.$NAME.$OPTION" || return 0 uci commit $CFG } diff --git a/packages/falter-common/files/usr/bin/ffdzero b/packages/falter-common/files/usr/bin/ffdzero index 24e8c2e1..381ff736 100755 --- a/packages/falter-common/files/usr/bin/ffdzero +++ b/packages/falter-common/files/usr/bin/ffdzero @@ -1,10 +1,12 @@ #!/bin/sh +# shellcheck shell=bash + test "$1" = "-h" && echo -e "Usage:\n\t$0 -h\n\t$0 [ { ip | hostname } ]" >&2 && exit 1 host="${1:-leipzig.freifunk.net}" -wget -O /dev/null http://$host/cgi-bin-dev-zero.bin -test "$?" = "1" && wget -O /dev/null http://$host/cgi-bin/dev-zero.bin -test "$?" = "1" && wget -O /dev/null http://$host/cgi-bin/luci/freifunk/status/zeroes +wget -O /dev/null "http://$host/cgi-bin-dev-zero.bin" +test "$?" = "1" && wget -O /dev/null "http://$host/cgi-bin/dev-zero.bin" +test "$?" = "1" && wget -O /dev/null "http://$host/cgi-bin/luci/freifunk/status/zeroes" test "$?" = "1" && echo "$host: no zero download found..." && exit 1 diff --git a/packages/falter-common/files/usr/bin/hna.lua b/packages/falter-common/files/usr/bin/hna.lua index ddaeae03..e302a82c 100755 --- a/packages/falter-common/files/usr/bin/hna.lua +++ b/packages/falter-common/files/usr/bin/hna.lua @@ -1,6 +1,6 @@ #!/usr/bin/lua ---[[] +--[[] Both functions, fetch_jsoninfo() and fetch_hna() are copied from /usr/lib/lua/luci/controller/olsr.lua. diff --git a/packages/falter-common/files/usr/bin/watch.sh b/packages/falter-common/files/usr/bin/watch.sh index 728526b9..57adf9b0 100755 --- a/packages/falter-common/files/usr/bin/watch.sh +++ b/packages/falter-common/files/usr/bin/watch.sh @@ -2,10 +2,10 @@ command="$1" interval="$2"; [ -z "$interval" ] && interval=1 -if [ -z $command ]; then +if [ -z "$command" ]; then echo 'Usage: watch.sh "command [options]" [interval], e.g. watch "ifconfig ath0" 2' echo 'interval is optional and defaults to 1' exit 1 fi -while true; do clear; $command; sleep $interval; done +while true; do clear; $command; sleep "$interval"; done