diff --git a/ffho/ffho-autoupdater/LICENSE b/ffho/ffho-autoupdater/LICENSE deleted file mode 100644 index ccbcaa21089abf13dfa65639c4e2d1ade5e9e0d6..0000000000000000000000000000000000000000 --- a/ffho/ffho-autoupdater/LICENSE +++ /dev/null @@ -1,26 +0,0 @@ -The code of Project Gluon may be distributed under the following terms, unless -noted otherwise in individual files or subtrees. - -Copyright (c) 2013, Project Gluon -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - diff --git a/ffho/ffho-autoupdater/Makefile b/ffho/ffho-autoupdater/Makefile deleted file mode 100644 index 7dad7c03de21fbbe9bacf493f6f4008e30291016..0000000000000000000000000000000000000000 --- a/ffho/ffho-autoupdater/Makefile +++ /dev/null @@ -1,50 +0,0 @@ -include $(TOPDIR)/rules.mk - -PKG_NAME:=ffho-autoupdater -PKG_VERSION:=1 -PKG_RELEASE:=$(GLUON_VERSION).$(GLUON_SITE_CODE)-$(GLUON_RELEASE).$(GLUON_CONFIG_VERSION) - -PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME) -PKG_BUILD_DEPENDS := respondd - -include $(GLUONDIR)/include/package.mk - -define Package/ffho-autoupdater - SECTION:=ffho - CATEGORY:=Gluon - TITLE:=Automatically update firmware - DEPENDS:=+gluon-core +libgluonutil +micrond +autoupdater - PROVIDES:=gluon-autoupdater - MAINTAINER:=Freifunk Hochstift <kontakt@hochstift.freifunk.net> - URL:=https://git.c3pb.de/freifunk-pb/ffho-packages -endef - -define Build/Prepare - mkdir -p $(PKG_BUILD_DIR) - $(CP) ./src/* $(PKG_BUILD_DIR)/ -endef - -define Build/Compile - $(call Build/Compile/Default) - $(call GluonSrcDiet,./luasrc,$(PKG_BUILD_DIR)/luadest/) -endef - -define Package/ffho-autoupdater/install - $(CP) ./files/* $(1)/ - $(CP) $(PKG_BUILD_DIR)/luadest/* $(1)/ - - $(INSTALL_DIR) $(1)/lib/gluon/respondd - $(CP) $(PKG_BUILD_DIR)/respondd.so $(1)/lib/gluon/respondd/autoupdater.so - - if [ '$(GLUON_BRANCH)' ]; then \ - $(INSTALL_DIR) $(1)/lib/gluon/autoupdater; \ - echo '$(GLUON_BRANCH)' > $(1)/lib/gluon/autoupdater/default_branch; \ - fi -endef - -define Package/ffho-autoupdater/postinst -#!/bin/sh -$(call GluonCheckSite,check_site.lua) -endef - -$(eval $(call BuildPackage,ffho-autoupdater)) diff --git a/ffho/ffho-autoupdater/ReadMe.md b/ffho/ffho-autoupdater/ReadMe.md deleted file mode 100644 index b0adde9aefdc29edb8a87236035c9eac6a17cee3..0000000000000000000000000000000000000000 --- a/ffho/ffho-autoupdater/ReadMe.md +++ /dev/null @@ -1,50 +0,0 @@ -ffho-autoupdater -================ - -This is a customized version of `gluon-autoupdater`. - -site.conf ---------- - -**autoupdater.branch: optional** -- Enables the autoupdater by default on the specifyed branch - -**autoupdater.branches.$name.name:** -- Branch name, has to be same as $name - -**autoupdater.branches.$name.mirrors:** -There are various patterns which can be used in the URLs -- `%n` is replaced by the OpenWrt version codename -- `%v` is replaced by the OpenWrt version number -- `%S` is replaced by the target architecture -- `%GS` is replaced by the Gluon site code -- `%GV` is replaced by the Gluon version -- `%GR` is replaced by the Gluon release - -**autoupdater.branches.$name.good_signatures:** -- Number of signatures needed to validate an update - -**autoupdater.branches.$name.pubkeys:** -- Public keys for signature validation - -### example -```lua -{ - autoupdater = { - branch = 'stable', - branches = { - stable = { - name = 'stable', - mirrors = { 'http://firmware.ffho.net/%GS/stable' }, - good_signatures = 2, - pubkeys = { - 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX', -- Alice - 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX', -- Bob - }, - }, - ... - }, - }, - ... -}, -``` diff --git a/ffho/ffho-autoupdater/check_site.lua b/ffho/ffho-autoupdater/check_site.lua deleted file mode 100644 index 9f443fec5ac71cd0f91f50cd231e2257554d25a2..0000000000000000000000000000000000000000 --- a/ffho/ffho-autoupdater/check_site.lua +++ /dev/null @@ -1,14 +0,0 @@ -need_string 'autoupdater.branch' - -local function check_branch(k, _) - assert_uci_name(k) - - local prefix = string.format('autoupdater.branches[%q].', k) - - need_string(prefix .. 'name') - need_string_array(prefix .. 'mirrors') - need_number(prefix .. 'good_signatures') - need_string_array(prefix .. 'pubkeys') -end - -need_table('autoupdater.branches', check_branch) diff --git a/ffho/ffho-autoupdater/files/lib/gluon/autoupdater/lib.sh b/ffho/ffho-autoupdater/files/lib/gluon/autoupdater/lib.sh deleted file mode 100644 index 36ddd97198ddeec68e74bf96950c94a65f3765e5..0000000000000000000000000000000000000000 --- a/ffho/ffho-autoupdater/files/lib/gluon/autoupdater/lib.sh +++ /dev/null @@ -1,16 +0,0 @@ -# Library to be sourced by download.d/abort.d scripts - - -stop() { - if [ -x /etc/init.d/$1 ]; then - echo "Stopping $1..." - /etc/init.d/$1 stop - fi -} - -start_enabled() { - if [ -x /etc/init.d/$1 ] && /etc/init.d/$1 enabled; then - echo "Starting $1..." - /etc/init.d/$1 start - fi -} diff --git a/ffho/ffho-autoupdater/files/usr/lib/autoupdater/abort.d/90gluon-autoupdater b/ffho/ffho-autoupdater/files/usr/lib/autoupdater/abort.d/90gluon-autoupdater deleted file mode 100755 index 19def9505b4d856331b7d29cc3f94c1f9bf0fab3..0000000000000000000000000000000000000000 --- a/ffho/ffho-autoupdater/files/usr/lib/autoupdater/abort.d/90gluon-autoupdater +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -. /lib/gluon/autoupdater/lib.sh - - -start_enabled cron -start_enabled haveged -start_enabled micrond -start_enabled sysntpd diff --git a/ffho/ffho-autoupdater/files/usr/lib/autoupdater/download.d/10gluon-autoupdater b/ffho/ffho-autoupdater/files/usr/lib/autoupdater/download.d/10gluon-autoupdater deleted file mode 100755 index 6f2268fedf1ca37eda3573e3e0ddb111daa028f4..0000000000000000000000000000000000000000 --- a/ffho/ffho-autoupdater/files/usr/lib/autoupdater/download.d/10gluon-autoupdater +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -. /lib/gluon/autoupdater/lib.sh - - -stop cron -stop haveged -stop micrond -stop sysntpd diff --git a/ffho/ffho-autoupdater/luasrc/lib/gluon/upgrade/500-autoupdater b/ffho/ffho-autoupdater/luasrc/lib/gluon/upgrade/500-autoupdater deleted file mode 100755 index 1621a1b7ab3dc938f68f22dd146ed973967e9696..0000000000000000000000000000000000000000 --- a/ffho/ffho-autoupdater/luasrc/lib/gluon/upgrade/500-autoupdater +++ /dev/null @@ -1,78 +0,0 @@ -#!/usr/bin/lua - -local fs = require 'nixio.fs' -local site = require 'gluon.site_config' -local uci = require 'luci.model.uci' -local util = require 'luci.util' - -local c = uci.cursor() - - -local subst = {} - -subst['%%v'] = util.trim(fs.readfile('/etc/openwrt_version')) -subst['%%n'], subst['%%S'] = util.exec('. /etc/openwrt_release; echo $DISTRIB_CODENAME; echo $DISTRIB_TARGET'):match('([^\n]*)\n([^\n]*)') -subst['%%GS'] = site.site_code -subst['%%GV'] = util.trim(fs.readfile('/lib/gluon/gluon-version')) -subst['%%GR'] = util.trim(fs.readfile('/lib/gluon/release')) - -function replace_patterns(url) - for k, v in pairs(subst) do - url = url:gsub(k, v) - end - - return url -end - -for name, config in pairs(site.autoupdater.branches) do - c:delete('autoupdater', name) - mirrors = {} - for i, v in ipairs(config.mirrors) do - mirrors[i]=replace_patterns(v) - end - c:section('autoupdater', 'branch', name, - { - name = config.name, - mirror = mirrors, - good_signatures = config.good_signatures, - pubkey = config.pubkeys, - } - ) -end - -if not c:get('autoupdater', 'settings') then - local enabled = 0 - local branch = site.autoupdater.branch - - local f = io.open('/lib/gluon/autoupdater/default_branch') - if f then - enabled = 1 - branch = f:read('*line') - f:close() - end - - c:section('autoupdater', 'autoupdater', 'settings', - { - enabled = enabled, - branch = branch, - } - ) -end - -c:set('autoupdater', 'settings', 'version_file', '/lib/gluon/release') - -c:save('autoupdater') - - -local autoupdater_util = require 'autoupdater.util' -autoupdater_util.randomseed() - - --- Perform updates at a random time between 04:00 and 05:00, and once an hour --- a fallback update (used after the regular updates haven't -local minute = math.random(0, 59) - -local f = io.open('/usr/lib/micron.d/autoupdater', 'w') -f:write(string.format('%i 4 * * * /usr/sbin/autoupdater\n', minute)) -f:write(string.format('%i 0-3,5-23 * * * /usr/sbin/autoupdater --fallback\n', minute)) -f:close() diff --git a/ffho/ffho-autoupdater/src/Makefile b/ffho/ffho-autoupdater/src/Makefile deleted file mode 100644 index 3ddc8a5861d74e13d521fda69a845efa66d0090f..0000000000000000000000000000000000000000 --- a/ffho/ffho-autoupdater/src/Makefile +++ /dev/null @@ -1,6 +0,0 @@ -all: respondd.so - -CFLAGS += -Wall - -respondd.so: respondd.c - $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -shared -fPIC -D_GNU_SOURCE -o $@ $^ $(LDLIBS) -lgluonutil -luci diff --git a/ffho/ffho-autoupdater/src/respondd.c b/ffho/ffho-autoupdater/src/respondd.c deleted file mode 100644 index 66b7a928ae952d38647b1e5f0adc09b946a306bf..0000000000000000000000000000000000000000 --- a/ffho/ffho-autoupdater/src/respondd.c +++ /dev/null @@ -1,79 +0,0 @@ -/* - Copyright (c) 2016, Matthias Schiffer <mschiffer@universe-factory.net> - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - - -#include <respondd.h> - -#include <json-c/json.h> -#include <libgluonutil.h> - -#include <uci.h> - -#include <string.h> - - -static struct json_object * get_autoupdater(void) { - struct uci_context *ctx = uci_alloc_context(); - ctx->flags &= ~UCI_FLAG_STRICT; - - struct uci_package *p; - if (uci_load(ctx, "autoupdater", &p)) - goto error; - - struct uci_section *s = uci_lookup_section(ctx, p, "settings"); - if (!s) - goto error; - - struct json_object *ret = json_object_new_object(); - - json_object_object_add(ret, "branch", gluonutil_wrap_string(uci_lookup_option_string(ctx, s, "branch"))); - - const char *enabled = uci_lookup_option_string(ctx, s, "enabled"); - json_object_object_add(ret, "enabled", json_object_new_boolean(enabled && !strcmp(enabled, "1"))); - - uci_free_context(ctx); - - return ret; - - error: - uci_free_context(ctx); - return NULL; -} - -static struct json_object * respondd_provider_nodeinfo(void) { - struct json_object *ret = json_object_new_object(); - - struct json_object *software = json_object_new_object(); - json_object_object_add(software, "autoupdater", get_autoupdater()); - json_object_object_add(ret, "software", software); - - return ret; -} - - -const struct respondd_provider_info respondd_providers[] = { - {"nodeinfo", respondd_provider_nodeinfo}, - {} -}; diff --git a/ffho/ffho-node-tuning/Makefile b/ffho/ffho-node-tuning/Makefile deleted file mode 100644 index 2c58fcecfcd7e34e4918a87d8340df1303f4defc..0000000000000000000000000000000000000000 --- a/ffho/ffho-node-tuning/Makefile +++ /dev/null @@ -1,45 +0,0 @@ -include $(TOPDIR)/rules.mk - -PKG_NAME:=ffho-node-tuning -PKG_VERSION:=1 -PKG_RELEASE:=$(GLUON_VERSION).$(GLUON_SITE_CODE)-$(GLUON_RELEASE).$(GLUON_CONFIG_VERSION) - -PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME) - -include $(GLUONDIR)/include/package.mk - -define Package/ffho-node-tuning - SECTION:=ffho - CATEGORY:=FFHO - TITLE:=Freifunk Hochstift Node Tuning-Settings - DEPENDS:=+gluon-core +busybox - MAINTAINER:=Freifunk Hochstift <kontakt@hochstift.freifunk.net> - URL:=https://git.c3pb.de/freifunk-pb/ffho-packages -endef - -define Package/ffho-node-tuning/description - As its name states, this packages applies some config optimizations (like - tweaking kernal knobs via sysctl) on the nodes. - For the most knobs Gluon sticks for OpenWRT defaults for good reasons, as - some values need to be set according to the environment of the nodes (e.g. - the network's size). As OpenWRT basically aims at providing a stable system - for standalone WiFi access-points, the system's default configuration may - not be appropriate anymore the larger the network grows, though. -endef - -define Build/Prepare - mkdir -p $(PKG_BUILD_DIR) -endef - -define Build/Configure -endef - -define Build/Compile - $(call GluonSrcDiet,./luasrc,$(PKG_BUILD_DIR)/luadest/) -endef - -define Package/ffho-node-tuning/install - $(CP) $(PKG_BUILD_DIR)/luadest/* $(1)/ -endef - -$(eval $(call BuildPackage,ffho-node-tuning)) diff --git a/ffho/ffho-node-tuning/ReadMe.md b/ffho/ffho-node-tuning/ReadMe.md deleted file mode 100644 index f4bb79d9711d3d4f185c556ed320597abf46163e..0000000000000000000000000000000000000000 --- a/ffho/ffho-node-tuning/ReadMe.md +++ /dev/null @@ -1,4 +0,0 @@ -ffho-node-tuning -================ - -comming soon ... diff --git a/ffho/ffho-node-tuning/luasrc/lib/gluon/upgrade/180-increase-arp-caches b/ffho/ffho-node-tuning/luasrc/lib/gluon/upgrade/180-increase-arp-caches deleted file mode 100755 index 26cadfe93b9089ffe2a48900958f95965e4e5b4e..0000000000000000000000000000000000000000 --- a/ffho/ffho-node-tuning/luasrc/lib/gluon/upgrade/180-increase-arp-caches +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/lua - -require 'luci.sys' -local sysctl = require 'gluon.sysctl' - -function sysctl_set_if_lower(_key, _value) - local command = "sysctl " .. _key - if (tonumber(luci.sys.exec(command):match('%d+', 34)) or 128) < _value then - sysctl.set(_key, _value) - end -end - -sysctl_set_if_lower('net.ipv4.neigh.default.gc_thresh1', 192) -sysctl_set_if_lower('net.ipv4.neigh.default.gc_thresh2', 640) -sysctl_set_if_lower('net.ipv4.neigh.default.gc_thresh3', 1280) -sysctl_set_if_lower('net.ipv6.neigh.default.gc_thresh1', 512) -sysctl_set_if_lower('net.ipv6.neigh.default.gc_thresh2', 1024) -sysctl_set_if_lower('net.ipv6.neigh.default.gc_thresh3', 1536) - -os.execute('sync; sysctl -qp') diff --git a/ffho/ffho-txpower-fix/Makefile b/ffho/ffho-txpower-fix/Makefile deleted file mode 100644 index 042227f6bf7c202f0da7d4b59912dce1065c8284..0000000000000000000000000000000000000000 --- a/ffho/ffho-txpower-fix/Makefile +++ /dev/null @@ -1,43 +0,0 @@ -include $(TOPDIR)/rules.mk - -PKG_NAME:=ffho-txpower-fix -PKG_VERSION:=1 - -PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME) - -include $(GLUONDIR)/include/package.mk - -define Package/ffho-txpower-fix - SECTION:=ffho - CATEGORY:=Workarounds - TITLE:=Fixes txpower on some wifi nodes under chaos calmer (gluon 2016.1.x) - DEPENDS:=+gluon-core - MAINTAINER:=Freifunk Hochstift <kontakt@hochstift.freifunk.net> - URL:=https://git.c3pb.de/freifunk-pb/ffho-packages -endef - -define Package/ffho-txpower-fix/description - With chaoscalmer, wifi nodes seemed to be locked to less txpower than they could do. - First suggestions are, that this is a mistake in the upstream OpenWrt-Code. Even the - bugtrackers of OpenWrt are full of this. - The idea of this workaround is, to check if the txpower could be increased if it isn't - already set to a special value. Unfortunately this can only be done by setting the - country code to 00. -endef - -define Build/Prepare - mkdir -p $(PKG_BUILD_DIR) -endef - -define Build/Configure -endef - -define Build/Compile - $(call GluonSrcDiet,./luasrc,$(PKG_BUILD_DIR)/luadest/) -endef - -define Package/ffho-txpower-fix/install - $(CP) $(PKG_BUILD_DIR)/luadest/* $(1)/ -endef - -$(eval $(call BuildPackage,ffho-txpower-fix)) diff --git a/ffho/ffho-txpower-fix/ReadMe.md b/ffho/ffho-txpower-fix/ReadMe.md deleted file mode 100644 index ede64412414629bf1995157b0f736dad48feb5e6..0000000000000000000000000000000000000000 --- a/ffho/ffho-txpower-fix/ReadMe.md +++ /dev/null @@ -1,10 +0,0 @@ -ffho-txpower-fix -================ - -With chaoscalmer, wifi nodes seemed to be locked to less txpower than they could -do. First suggestions are, that this is a mistake in the upstream OpenWrt-Code. -Even the bugtrackers of OpenWrt are full of this. - -The idea of this workaround is, to check if the txpower could be increased if -it isn't already set to a special value. Unfortunately this can only be done by -changing the country code. diff --git a/ffho/ffho-txpower-fix/luasrc/lib/gluon/upgrade/210-ffho-txpower-fix b/ffho/ffho-txpower-fix/luasrc/lib/gluon/upgrade/210-ffho-txpower-fix deleted file mode 100755 index f530d1e5bd25a78fadd0cea99a6275bd6c06cdfe..0000000000000000000000000000000000000000 --- a/ffho/ffho-txpower-fix/luasrc/lib/gluon/upgrade/210-ffho-txpower-fix +++ /dev/null @@ -1,58 +0,0 @@ -#!/usr/bin/lua - -site = require("gluon.site_config") -uci = require('luci.model.uci').cursor() - ---- wrapper for calling systemcommands -function cmd(_command) - local f = io.popen(_command) - local l = f:read("*a") - f:close() - return l -end - ---- first of all, get 2.4GHz wifi interface -local interface24 = false -if uci:get('wireless', 'radio0', 'hwmode') then - hwmode = uci:get('wireless', 'radio0', 'hwmode') - if hwmode == '11g' then - interface24 = 'radio0' - end -end - ---- try with radio1 if radio0 seems not the correct interface -if not interface24 and uci:get('wireless', 'radio1', 'hwmode') then - hwmode = uci:get('wireless', 'radio1', 'hwmode') - if hwmode == '11g' then - interface24 = 'radio1' - end -end -if not interface24 then - os.exit(0) -- something went wrong -end - ---- check if txpower is already set. if so, we have nothing to do -if uci:get('wireless', interface24, 'txpower') then - os.exit(0) -end - ---- get maximum available power and step -t = cmd('iwinfo ' .. interface24 .. ' txpowerlist | tail -n 1 | awk \'{print $1}\'') -maximumTxPowerDb = string.gsub(t, "\n", "") -maximumTxPowerDb = tonumber(maximumTxPowerDb) - -if maximumTxPowerDb < 20 then - t = cmd('iwinfo ' .. interface24 .. ' txpowerlist | wc -l') - maximumTxPower = string.gsub(t, "\n", "") - maximumTxPower = tonumber(maximumTxPower)-1 -else - t = cmd('iwinfo ' .. interface24 .. ' txpowerlist | grep -n "20 dBm" | cut -f1 -d\':\'') - maximumTxPower = string.gsub(t, "\n", "") - maximumTxPower = tonumber(maximumTxPower)-1 -end - ---- set values -uci:set('wireless', interface24, 'country', '00') -uci:set('wireless', interface24, 'txpower', maximumTxPower) -uci:save('wireless') - diff --git a/ffho/ffho-wifi-blackout-workaround/Makefile b/ffho/ffho-wifi-blackout-workaround/Makefile deleted file mode 100644 index 34a1890b4394ffb74a09aa176df7acae39821235..0000000000000000000000000000000000000000 --- a/ffho/ffho-wifi-blackout-workaround/Makefile +++ /dev/null @@ -1,38 +0,0 @@ -include $(TOPDIR)/rules.mk - -PKG_NAME:=ffho-wifi-blackout-workaround -PKG_VERSION:=2 -PKG_RELEASE:=$(GLUON_VERSION).$(GLUON_SITE_CODE)-$(GLUON_RELEASE).$(GLUON_CONFIG_VERSION) - -PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME) - -include $(INCLUDE_DIR)/package.mk - -define Package/ffho-wifi-blackout-workaround - SECTION:=ffho - CATEGORY:=Workarounds - TITLE:=WiFi-Blackout workaround - DEPENDS:=+gluon-core - MAINTAINER:=Freifunk Hochstift <kontakt@hochstift.freifunk.net> - URL:=https://git.c3pb.de/freifunk-pb/ffho-packages -endef - -define Package/ffho-wifi-blackout-workaround/description - Disables the ANI feature. -endef - -define Build/Prepare - mkdir -p $(PKG_BUILD_DIR) -endef - -define Build/Configure -endef - -define Build/Compile -endef - -define Package/ffho-wifi-blackout-workaround/install - $(CP) ./files/* $(1)/ -endef - -$(eval $(call BuildPackage,ffho-wifi-blackout-workaround)) diff --git a/ffho/ffho-wifi-blackout-workaround/ReadMe.md b/ffho/ffho-wifi-blackout-workaround/ReadMe.md deleted file mode 100644 index bb0e0eafa77fd6c89adc795b4b57877b95823c9f..0000000000000000000000000000000000000000 --- a/ffho/ffho-wifi-blackout-workaround/ReadMe.md +++ /dev/null @@ -1,6 +0,0 @@ -ffho-wifi-blackout-workaround -============================= - -In order to avoid further WiFi-Blackouts that *might* be caused by a buggy ANI -feature in the ath9k kernel module, we disable ANI until it got fixed in -OpenWRT completely. diff --git a/ffho/ffho-wifi-blackout-workaround/files/etc/hotplug.d/iface/99-ath9k_disable_ani b/ffho/ffho-wifi-blackout-workaround/files/etc/hotplug.d/iface/99-ath9k_disable_ani deleted file mode 100644 index b5210257401d4cdcb6bcc62f2fe7feea4d4bec59..0000000000000000000000000000000000000000 --- a/ffho/ffho-wifi-blackout-workaround/files/etc/hotplug.d/iface/99-ath9k_disable_ani +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh -# -# "ANI-thing is better than no WiFi"-Workaround -# -# In order to avoid further WiFi-Blackouts that *might* be caused by a buggy -# ANI feature in the ath9k kernel module, we disable ANI until it got fixed in -# OpenWRT completely. - -# Don't need to do anything, unless the script gets triggered by an "ifup" -# event. -[[ "$ACTION" != "ifup" ]] && exit 0; -[[ "$INTERFACE" != "mesh_radio0" && "$INTERFACE" != "ibss_radio0" && "$INTERFACE" != "mesh_radio1" && "$INTERFACE" != "ibss_radio1" && "$INTERFACE" != "client" ]] && exit 0; - -# Test whether disabling ANI is applicable or not -if [ -e "/sys/kernel/debug/ieee80211/phy0/ath9k/ani" ] ; then - logger -s -t ath9k-disable-ani -p local0.info "phy0 disabling ANI" - /bin/echo 0 > /sys/kernel/debug/ieee80211/phy0/ath9k/ani -fi - -if [ -e "/sys/kernel/debug/ieee80211/phy1/ath9k/ani" ] ; then - logger -s -t ath9k-disable-ani -p local0.info "phy1 disabling ANI" - /bin/echo 0 > /sys/kernel/debug/ieee80211/phy1/ath9k/ani -fi diff --git a/ffho/ffho-wifi-mesh-macfilter/Makefile b/ffho/ffho-wifi-mesh-macfilter/Makefile deleted file mode 100644 index 8c3cf9d30297f44eca936346bab22eb171449d36..0000000000000000000000000000000000000000 --- a/ffho/ffho-wifi-mesh-macfilter/Makefile +++ /dev/null @@ -1,43 +0,0 @@ -include $(TOPDIR)/rules.mk - -PKG_NAME:=ffho-wifi-mesh-macfilter -PKG_VERSION:=1 -PKG_RELEASE:=1 - -PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME) - -include $(INCLUDE_DIR)/package.mk - -define Package/ffho-wifi-mesh-macfilter - SECTION:=ffho - CATEGORY:=Workarounds - TITLE:=WiFi - block/open 802.11s-mesh stations - DEPENDS:=+iw +uci - MAINTAINER:=Freifunk Hochstift <kontakt@hochstift.freifunk.net> - URL:=https://git.c3pb.de/freifunk-pb/ffho-packages -endef - -define Package/ffho-wifi-mesh-macfilter/description - Setting plink_action [block|open], when 802.11s mesh-interface comes up. - Define filterpolicy in uci wireless.<wifi-iface>.macfilter=[disable|deny|allow]. - Deny sets iw dev <device> station set <mac> plink_action block, and - allow sets iw dev <device> mesh_param mesh_auto_open_plink=0 and - iw dev <device> station set <mac> plink_action open. List MAC adresses - (divided by spaces) in uci wireless.<wifi-iface>.maclist. -endef - -define Build/Prepare - mkdir -p $(PKG_BUILD_DIR) -endef - -define Build/Configure -endef - -define Build/Compile -endef - -define Package/ffho-wifi-mesh-macfilter/install - $(CP) ./files/* $(1)/ -endef - -$(eval $(call BuildPackage,ffho-wifi-mesh-macfilter)) diff --git a/ffho/ffho-wifi-mesh-macfilter/ReadMe.md b/ffho/ffho-wifi-mesh-macfilter/ReadMe.md deleted file mode 100644 index 65b291aab292053f366f6892d3e23ca111624d89..0000000000000000000000000000000000000000 --- a/ffho/ffho-wifi-mesh-macfilter/ReadMe.md +++ /dev/null @@ -1,26 +0,0 @@ -ffho-wifi-mesh-macfilter -======================== - -Setting plink_action [block|open], when 802.11s mesh-interface comes up. - -/etc/config/wireless --------------------- - -**wireless.wifi-iface.macfilter: optional** -- `disable`, disables the macfilter -- `deny`, blocks the listed MACs by executing - `iw dev $device station set $mac plink_action block` -- `allow`, only allows the listed MACs by executing - `iw dev $device mesh_param mesh_auto_open_plink=0` and - `iw dev $device$ station set $mac plink_action open` - -**wireless.$wifi-iface.maclist: optional** -List of MAC addresses (devided by spaces) - -### example -``` -config wifi-iface 'mesh_radio0' - option macfilter 'deny' - option maxlist '01:23:45:67:89:ab 45:67:89:ab:cd:ef' - ... -``` diff --git a/ffho/ffho-wifi-mesh-macfilter/files/etc/hotplug.d/iface/80-wifi-mesh-macfilter b/ffho/ffho-wifi-mesh-macfilter/files/etc/hotplug.d/iface/80-wifi-mesh-macfilter deleted file mode 100644 index 39b9072c09942ce19ba5fa3edf5b998245536bcd..0000000000000000000000000000000000000000 --- a/ffho/ffho-wifi-mesh-macfilter/files/etc/hotplug.d/iface/80-wifi-mesh-macfilter +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/sh - -local MODE -local POLICY -local IW_POLICY -local MAC -local MACLIST - -[[ "$ACTION" != ifup ]] && exit 0; - -. /lib/functions.sh -config_load "wireless" - -config_get MODE $INTERFACE mode -[[ $MODE != mesh ]] && exit 0; - -config_get POLICY $INTERFACE macfilter -case $POLICY in - deny) IW_POLICY="block";; - allow) IW_POLICY="open"; iw dev $DEVICE set mesh_param mesh_auto_open_plinks=0;; - *) exit 0;; -esac - -config_get MACLIST $INTERFACE maclist -for MAC in $MACLIST; do - iw dev $DEVICE station set $MAC plink_action $IW_POLICY -done