diff options
5 files changed, 16 insertions, 33 deletions
diff --git a/applications/luci-app-olsr-services/luasrc/view/freifunk-services/services.htm b/applications/luci-app-olsr-services/luasrc/view/freifunk-services/services.htm index 7142c77b39..0e59c61258 100644 --- a/applications/luci-app-olsr-services/luasrc/view/freifunk-services/services.htm +++ b/applications/luci-app-olsr-services/luasrc/view/freifunk-services/services.htm @@ -93,9 +93,9 @@ if luci.http.formvalue("status") == "1" then local rv = {} for k, line in ipairs(services) do local field = utl.split(line, "[#|]", split, true) - local origin_lnk = ip.IPv6(pcdata(field[4])) or "" + local origin_lnk = ip.IPv6(pcdata(field[4])) local origin_link = "" - if #origin_lnk ~= 0 and origin_lnk:is6() then + if origin_lnk and origin_lnk:is6() then origin_link = "["..origin_lnk:string().."]" else origin_link = pcdata(field[4]) @@ -168,9 +168,9 @@ end local field = {} -- split line at # and |, 1=url, 2=proto, 3=description, 4=source local field = utl.split(line, "[#|]", split, true) - local origin_lnk = ip.IPv6(pcdata(field[4])) or "" + local origin_lnk = ip.IPv6(pcdata(field[4])) local origin_link - if #origin_lnk ~= 0 and origin_lnk:is6() then + if origin_lnk and origin_lnk:is6() then origin_link = "["..origin_lnk:string().."]" else origin_link = pcdata(field[4]) diff --git a/applications/luci-app-splash/root/usr/sbin/luci-splash b/applications/luci-app-splash/root/usr/sbin/luci-splash index e566e9b508..2870dbe6aa 100755 --- a/applications/luci-app-splash/root/usr/sbin/luci-splash +++ b/applications/luci-app-splash/root/usr/sbin/luci-splash @@ -7,6 +7,7 @@ ipc = require "luci.ip" -- Init state session local uci = require "luci.model.uci".cursor_state() +local ipt = require "luci.sys.iptparser".IptParser() local fs = require "nixio.fs" local ip = require "luci.ip" @@ -137,27 +138,33 @@ function ipvalid(ipaddr) end function mac_to_ip(mac) + local ipaddr = nil ipc.neighbors({ family = 4 }, function(n) if n.mac == mac and n.dest then - return n.dest:string() + ipaddr = n.dest:string() end end) + return ipaddr end function mac_to_dev(mac) + local dev = nil ipc.neighbors({ family = 4 }, function(n) if n.mac == mac and n.dev then - return n.dev + dev = n.dev end end) + return dev end function ip_to_mac(ip) + local mac = nil ipc.neighbors({ family = 4 }, function(n) if n.mac and n.dest and n.dest:equal(ip) then - return n.mac + mac = n.mac end end) + return mac end function main(argv) diff --git a/contrib/package/community-profiles/files/etc/config/profile_aachen b/contrib/package/community-profiles/files/etc/config/profile_aachen deleted file mode 100644 index cc643e1312..0000000000 --- a/contrib/package/community-profiles/files/etc/config/profile_aachen +++ /dev/null @@ -1,10 +0,0 @@ -config 'community' 'profile' - option 'name' 'Aachen' - option 'homepage' 'http://aachen.freifunk.net' - option 'ssid' 'aachen.freifunk.net' - option 'suffix' 'ffac' - option 'latitude' '50.77900' - option 'longitude' '6.05399' - option 'mesh_network' '10.90.0.0/16' - option 'splash_network' '10.104.0.0/16' - option 'splash_prefix' '28' diff --git a/contrib/package/community-profiles/files/etc/config/profile_neuss b/contrib/package/community-profiles/files/etc/config/profile_neuss deleted file mode 100644 index 8e30617305..0000000000 --- a/contrib/package/community-profiles/files/etc/config/profile_neuss +++ /dev/null @@ -1,15 +0,0 @@ -config 'community' 'profile' - option 'name' 'Freifunk Neuss' - option 'homepage' 'http://neuss.freifunk.net' - option 'ssid' 'neuss.freifunk.net' - option 'mesh_network' '172.28.0.0/16' - option 'splash_network' '10.104.0.0/16' - option 'splash_prefix' '27' - option 'latitude' '51.19045' - option 'longitude' '6.69471' - -config 'defaults' 'wifi_device' - option 'channel' '11' - -config 'defaults' 'wifi_iface' - option 'bssid' 'DE:AD:BE:EF:CA:FE' diff --git a/themes/luci-theme-freifunk-generic/luasrc/view/themes/freifunk-generic/header.htm b/themes/luci-theme-freifunk-generic/luasrc/view/themes/freifunk-generic/header.htm index d74916aea1..20a41be855 100644 --- a/themes/luci-theme-freifunk-generic/luasrc/view/themes/freifunk-generic/header.htm +++ b/themes/luci-theme-freifunk-generic/luasrc/view/themes/freifunk-generic/header.htm @@ -10,6 +10,7 @@ local util = require "luci.util" local http = require "luci.http" local disp = require "luci.dispatcher" + local version = require "luci.version" local sysinfo = util.ubus("system", "info") or { } local loadinfo = sysinfo.load or { 0, 0, 0 } @@ -122,7 +123,7 @@ <%end%> </div> <div class="header_right"> - <%=luci.version.distversion%><br /> + <%=version.distversion%><br /> <%:Load%>: <%="%.2f" % (loadinfo[1] / 65535.0)%> <%="%.2f" % (loadinfo[2] / 65535.0)%> <%="%.2f" % (loadinfo[3] / 65535.0)%><br /> <%:Hostname%>: <%=boardinfo.hostname or "?"%><br /> <span id="xhr_poll_status" style="display:none" onclick="XHR.running() ? XHR.halt() : XHR.run()"> |