summaryrefslogtreecommitdiffhomepage
path: root/contrib/package/freifunk-common/files
diff options
context:
space:
mode:
authorSven Roederer <freifunk@it-solutions.geroedel.de>2019-02-03 14:13:35 +0100
committerSven Roederer <freifunk@it-solutions.geroedel.de>2019-02-13 21:23:34 +0100
commit4654ba92c3999d84b08211f05d2ccb5ea9da731b (patch)
tree06cedf8e8badc0ce584d8bd5e97fab7476c81549 /contrib/package/freifunk-common/files
parenteda8f02dac3caa4d0f52cd1e860d7a392c295df3 (diff)
treewide: move freifunk-related packages to separate repo
Even Freifunk was one of the major factory to create the LuCI-system, it's now only a very small part of LuCI. LuCI has become a much bigger thing and it seems that it's time to move the packages only relating to Freifunk into it's own feed. On the mailinglist it was discussed [1] and a repo below the general Freifunk team on github was created. This commit removes all packages that will be hosted in the new repo [2] 1 - http://lists.freifunk.net/pipermail/wlannews-freifunk.net/2019-February/004818.html 2 - https://github.com/freifunk/openwrt-packages Signed-off-by: Sven Roederer <freifunk@it-solutions.geroedel.de>
Diffstat (limited to 'contrib/package/freifunk-common/files')
-rw-r--r--contrib/package/freifunk-common/files/etc/config/freifunk120
-rwxr-xr-xcontrib/package/freifunk-common/files/etc/init.d/freifunk25
-rw-r--r--contrib/package/freifunk-common/files/etc/rc.local.d/01-config-migration51
-rw-r--r--contrib/package/freifunk-common/files/etc/uci-defaults/freifunk2
-rwxr-xr-xcontrib/package/freifunk-common/files/usr/bin/ffdzero10
-rwxr-xr-xcontrib/package/freifunk-common/files/usr/bin/neigh.sh103
-rwxr-xr-xcontrib/package/freifunk-common/files/usr/bin/watch.sh11
-rwxr-xr-xcontrib/package/freifunk-common/files/usr/sbin/ff_olsr_watchdog38
8 files changed, 0 insertions, 360 deletions
diff --git a/contrib/package/freifunk-common/files/etc/config/freifunk b/contrib/package/freifunk-common/files/etc/config/freifunk
deleted file mode 100644
index b1a2e41e2a..0000000000
--- a/contrib/package/freifunk-common/files/etc/config/freifunk
+++ /dev/null
@@ -1,120 +0,0 @@
-package 'freifunk'
-
-config 'public' 'contact'
- option 'nickname' ''
- option 'name' ''
- option 'mail' ''
- option 'phone' ''
- option 'note' ''
-
-config 'public' 'community'
- option 'name' 'Freifunk'
- option 'homepage' 'http://freifunk.net'
-
-config 'fw_zone' 'zone_freifunk'
- option 'name' 'freifunk'
- option 'input' 'REJECT'
- option 'forward' 'REJECT'
- option 'output' 'ACCEPT'
-
-config 'fw_rule' 'fficmp'
- option 'src' 'freifunk'
- option 'target' 'ACCEPT'
- option 'proto' 'icmp'
-
-config 'fw_rule' 'ffhttp'
- option 'src' 'freifunk'
- option 'target' 'ACCEPT'
- option 'proto' 'tcp'
- option 'dest_port' '80'
-
-config 'fw_rule' 'ffhttps'
- option 'src' 'freifunk'
- option 'target' 'ACCEPT'
- option 'proto' 'tcp'
- option 'dest_port' '443'
-
-config 'fw_rule' 'ffssh'
- option 'src' 'freifunk'
- option 'target' 'ACCEPT'
- option 'proto' 'tcp'
- option 'dest_port' '22'
-
-config 'fw_rule' 'ffolsr'
- option 'src' 'freifunk'
- option 'target' 'ACCEPT'
- option 'proto' 'udp'
- option 'dest_port' '698'
-
-config 'fw_rule' 'ffwprobe'
- option 'src' 'freifunk'
- option 'target' 'ACCEPT'
- option 'proto' 'tcp'
- option 'dest_port' '17990'
-
-config 'fw_rule' 'ffdns'
- option 'dest_port' '53'
- option 'src' 'freifunk'
- option 'target' 'ACCEPT'
- option 'proto' 'udp'
-
-config 'fw_rule' 'ffdhcp'
- option 'src_port' '68'
- option 'src' 'freifunk'
- option 'target' 'ACCEPT'
- option 'dest_port' '67'
- option 'proto' 'udp'
- option 'leasetime' '30m'
-
-config 'fw_rule' 'ffsplash'
- option 'dest_port' '8082'
- option 'src' 'freifunk'
- option 'target' 'ACCEPT'
- option 'proto' 'tcp'
-
-config 'fw_forwarding' 'lanfffwd'
- option 'src' 'lan'
- option 'dest' 'freifunk'
-
-config 'fw_forwarding' 'ffwanfwd'
- option 'src' 'freifunk'
- option 'dest' 'wan'
-
-config 'fw_forwarding' 'fffwd'
- option 'src' 'freifunk'
- option 'dest' 'freifunk'
-
-config 'include' 'freifunk'
- option 'path' '/etc/firewall.freifunk'
-
-config 'defaults' 'system'
- option 'zonename' 'Europe/Berlin'
- option 'timezone' 'CET-1CEST,M3.5.0,M10.5.0/3'
-
-config 'defaults' 'wifi_device'
- option 'channel' '1'
- option 'diversity' '1'
- option 'disabled' '0'
- option 'country' 'DE'
- option 'distance' '1000'
-
-config 'defaults' 'wifi_iface'
- option 'mode' 'adhoc'
- option 'encryption' 'none'
- option 'bssid' '12:CA:FF:EE:BA:BE'
- option 'mcast_rate' '6000'
-
-config 'defaults' 'interface'
- option 'netmask' '255.255.0.0'
- option 'dns' '8.8.8.8 212.204.49.83 141.1.1.1'
-
-config 'defaults' 'alias'
- option 'netmask' '255.255.255.0'
-
-config 'defaults' 'dhcp'
- option 'leasetime' '30m'
- option 'start' '2'
- option 'force' '1'
-
-config 'defaults' 'olsr_interfacedefaults'
- option 'Ip4Broadcast' '255.255.255.255'
diff --git a/contrib/package/freifunk-common/files/etc/init.d/freifunk b/contrib/package/freifunk-common/files/etc/init.d/freifunk
deleted file mode 100755
index dbe648ae5d..0000000000
--- a/contrib/package/freifunk-common/files/etc/init.d/freifunk
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh /etc/rc.common
-# Freifunk Init
-# $Id$
-
-START=99
-
-boot() {
- test -f /etc/crontabs/root || touch /etc/crontabs/root
-
- grep -q 'killall -HUP dnsmasq' /etc/crontabs/root || {
- echo "*/5 * * * * killall -HUP dnsmasq" >> /etc/crontabs/root
- }
-
- grep -q '/usr/sbin/ff_olsr_watchdog' /etc/crontabs/root || {
- echo "*/5 * * * * /usr/sbin/ff_olsr_watchdog" >> /etc/crontabs/root
- }
-
- [ -d /etc/rc.local.d ] && {
- for file in /etc/rc.local.d/*; do
- test -f "$file" && . "$file"
- done
- }
-
- /etc/init.d/cron restart &
-}
diff --git a/contrib/package/freifunk-common/files/etc/rc.local.d/01-config-migration b/contrib/package/freifunk-common/files/etc/rc.local.d/01-config-migration
deleted file mode 100644
index 11f1ad60bc..0000000000
--- a/contrib/package/freifunk-common/files/etc/rc.local.d/01-config-migration
+++ /dev/null
@@ -1,51 +0,0 @@
-# Fixup various configurations to remove quirks
-# from former versions.
-
-_log() {
- logger -t "Config Migration" "$1"
-}
-
-_uci() {
- uci ${2:+-c $2} get "$1" 2>/dev/null
-}
-
-
-# Splash redirector had a wrong virtual url match
-# which resulted in "No such handler"
-
-[ "$(_uci lucid.splashredir.virtual)" == "/" ] && {
- _log "Fix splash redirector configuration"
- uci set lucid.splashredir.virtual=''
- uci commit lucid
- /etc/init.d/lucid restart
-}
-
-
-# Newer OLSR versions have the MinTCVtime hack active,
-# ensure proper timings or olsrd won't start
-
-FIX=0
-for i in 0 1 2 3 4; do
- [ -z "$(_uci olsrd.@Interface[$i].TcInterval)" ] && \
- [ -z "$(_uci olsrd.@Interface[$i].TcValidityTime)" ] || {
- uci delete olsrd.@Interface[$i].TcInterval
- uci delete olsrd.@Interface[$i].TcValidityTime
- FIX=1
- }
-done
-
-[ "$FIX" == 1 ] && {
- _log "Fix olsrd configuration for MinTCVTime hack"
- uci commit olsrd
- /etc/init.d/olsrd restart
-}
-
-
-# Ensure that the community definitions are in the
-# new format
-
-[ -z "$(_uci freifunk.leipzig.mesh_network)" ] && \
-[ -n "$(_uci freifunk.leipzig.mesh_network /rom/etc/config)" ] && {
- _log "Converting freifunk configuration to new format"
- cp /rom/etc/config/freifunk /etc/config/freifunk
-}
diff --git a/contrib/package/freifunk-common/files/etc/uci-defaults/freifunk b/contrib/package/freifunk-common/files/etc/uci-defaults/freifunk
deleted file mode 100644
index fe6586c224..0000000000
--- a/contrib/package/freifunk-common/files/etc/uci-defaults/freifunk
+++ /dev/null
@@ -1,2 +0,0 @@
-uci set uhttpd.main.rfc1918_filter=0
-uci commit uhttpd
diff --git a/contrib/package/freifunk-common/files/usr/bin/ffdzero b/contrib/package/freifunk-common/files/usr/bin/ffdzero
deleted file mode 100755
index 24e8c2e181..0000000000
--- a/contrib/package/freifunk-common/files/usr/bin/ffdzero
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/sh
-
-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
-test "$?" = "1" && echo "$host: no zero download found..." && exit 1
diff --git a/contrib/package/freifunk-common/files/usr/bin/neigh.sh b/contrib/package/freifunk-common/files/usr/bin/neigh.sh
deleted file mode 100755
index 82589ecfdf..0000000000
--- a/contrib/package/freifunk-common/files/usr/bin/neigh.sh
+++ /dev/null
@@ -1,103 +0,0 @@
-#!/bin/sh
-
-. /usr/share/libubox/jshn.sh
-
-hostsfile_getname()
-{
- local config="$1"
- local i=0
- local value file
-
- while value="$( uci -q get $config.@LoadPlugin[$i].library )"; do {
- case "$value" in
- 'olsrd_nameservice'*)
- file="$( uci -q get $config.@LoadPlugin[$i].hosts_file )"
- break
- ;;
- esac
-
- i=$(( i + 1 ))
- } done
-
- echo "${file:-/var/run/hosts_olsr}"
-}
-
-read_hostnames()
-{
- local file_list=" $( hostsfile_getname 'olsrd' ) $(hostsfile_getname 'olsrd6' ) "
- local line ip hostname file file_list_uniq
-
- for file in $file_list; do {
- case " $file_list_uniq " in
- *" $file "*)
- ;;
- *)
- file_list_uniq="$file_list_uniq $file"
- ;;
- esac
- } done
-
- for file in $file_list_uniq; do {
- [ -e "$file" ] || continue
-
- while read -r line; do {
- case "$line" in
- [0-9]*)
- # 2001:bf7:820:901::1 stuttgarter-core.olsr # myself
- # 10.63.160.161 AlexLaterne # 10.63.160.161
- set -f
- set +f -- $line
- ip="$1"
- hostname="$2"
-
- # global vars, e.g.
- # IP_1_2_3_4='foo' or IP_2001_bf7_820_901__1='bar'
- eval IP_${ip//[.:]/_}="$hostname"
- ;;
- esac
- } done <"$file"
- } done
-}
-
-read_hostnames
-
-VARS='localIP:Local remoteIP:Remote validityTime:vTime linkQuality:LQ'
-VARS="$VARS neighborLinkQuality:NLQ linkCost:Cost remoteHostname:Host"
-
-for HOST in '127.0.0.1' '::1';do
- json_init
- json_load "$( echo /links | nc $HOST 9090 | sed -n '/^[}{ ]/p' )" # remove header/non-json
-
- if json_is_a links array;then
- json_select links
- for v in ${VARS};do
- eval _${v%:*}=0
- done
- for j in 0 1;do
- case ${j} in 1)
- for v in ${VARS};do
- eval printf \"%-\${_${v%:*}}s \" ${v#*:}
- done
- echo
- ;;esac
- i=1;while json_is_a ${i} object;do
- json_select ${i}
- json_get_vars $(for v in ${VARS};do echo ${v%:*};done)
- case ${j} in 0)
- for v in ${VARS};do
- eval "test \${_${v%:*}} -lt \${#${v%:*}} && _${v%:*}=\${#${v%:*}}"
- done
- ;;*)
- for v in ${VARS};do
- eval printf \"%-\${_${v%:*}}s \" \$${v%:*}
- eval remoteHostname="\$IP_${remoteIP//[.:]/_}"
- done
- echo
- ;;esac
- json_select ..
- i=$(( i + 1 ))
- done
- done
- fi
- echo
-done
diff --git a/contrib/package/freifunk-common/files/usr/bin/watch.sh b/contrib/package/freifunk-common/files/usr/bin/watch.sh
deleted file mode 100755
index 728526b9e1..0000000000
--- a/contrib/package/freifunk-common/files/usr/bin/watch.sh
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/sh
-command="$1"
-interval="$2"; [ -z "$interval" ] && interval=1
-
-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
diff --git a/contrib/package/freifunk-common/files/usr/sbin/ff_olsr_watchdog b/contrib/package/freifunk-common/files/usr/sbin/ff_olsr_watchdog
deleted file mode 100755
index af1d7ca68d..0000000000
--- a/contrib/package/freifunk-common/files/usr/sbin/ff_olsr_watchdog
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/usr/bin/lua
-
-require "os"
-require "io"
-require "uci"
-local fs = require "nixio.fs"
-
-if fs.access("/var/run/olsrd.pid") or fs.access("/var/run/olsrd4.pid") then
- local stamp, intv
- local x = uci.cursor()
-
- x:foreach("olsrd", "LoadPlugin",
- function(s)
- if s.library == "olsrd_watchdog" then
- intv = tonumber(s.interval)
- stamp = s.file
- end
- end)
-
- if intv and fs.access(stamp) then
- local systime = os.time()
- local wdgtime = tonumber(io.lines(stamp)())
-
- if not wdgtime or ( systime - wdgtime ) > ( intv * 2 ) then
- os.execute("logger -t 'OLSR watchdog' 'Process died - restarting!'")
- local tnls = io.popen("ip tunnel show | cut -d : -f 1")
- while true do
- tnl = tnls:read("*line")
- if tnl == nil then break end
- if string.find(tnl, "tnl_") == 1 then
- os.execute(string.format("logger -t 'OLSR watchdog' 'Deleting stale tunnel %s'", tnl))
- os.execute(string.format("ip link del %s", tnl))
- end
- end
- os.execute("/etc/init.d/olsrd restart")
- end
- end
-end