summaryrefslogtreecommitdiffhomepage
path: root/contrib/package
diff options
context:
space:
mode:
authorHannu Nyman <hannu.nyman@iki.fi>2019-02-17 16:43:29 +0200
committerGitHub <noreply@github.com>2019-02-17 16:43:29 +0200
commit55cd0c4c6b572f5b35244927a738c46b7dd711b8 (patch)
tree57a427db406f6e0358a0dd1a1afe93c3a4139782 /contrib/package
parent7f791e9cf428b9c5347a48b6f39e20bd7f7a24e7 (diff)
parent4654ba92c3999d84b08211f05d2ccb5ea9da731b (diff)
Merge pull request #2533 from freifunk-berlin/freifunk-repo
treewide: move freifunk-related packages to separate repo
Diffstat (limited to 'contrib/package')
-rw-r--r--contrib/package/community-profiles/Makefile39
-rw-r--r--contrib/package/community-profiles/files/etc/config/profile_Freifunk10
-rw-r--r--contrib/package/community-profiles/files/etc/config/profile_altmark56
-rw-r--r--contrib/package/community-profiles/files/etc/config/profile_arig_arad22
-rw-r--r--contrib/package/community-profiles/files/etc/config/profile_arig_neot_semadar22
-rw-r--r--contrib/package/community-profiles/files/etc/config/profile_arig_tel-aviv22
-rw-r--r--contrib/package/community-profiles/files/etc/config/profile_augsburg64
-rw-r--r--contrib/package/community-profiles/files/etc/config/profile_bayreuth20
-rw-r--r--contrib/package/community-profiles/files/etc/config/profile_bergischesland15
-rw-r--r--contrib/package/community-profiles/files/etc/config/profile_berlin39
-rw-r--r--contrib/package/community-profiles/files/etc/config/profile_carbodebit23
-rw-r--r--contrib/package/community-profiles/files/etc/config/profile_cottbus37
-rw-r--r--contrib/package/community-profiles/files/etc/config/profile_demo21
-rw-r--r--contrib/package/community-profiles/files/etc/config/profile_duesseldorf15
-rw-r--r--contrib/package/community-profiles/files/etc/config/profile_erfurt48
-rw-r--r--contrib/package/community-profiles/files/etc/config/profile_evernet25
-rw-r--r--contrib/package/community-profiles/files/etc/config/profile_freiburg45
-rw-r--r--contrib/package/community-profiles/files/etc/config/profile_fuerstenwalde38
-rw-r--r--contrib/package/community-profiles/files/etc/config/profile_gadow23
-rw-r--r--contrib/package/community-profiles/files/etc/config/profile_guifibages19
-rw-r--r--contrib/package/community-profiles/files/etc/config/profile_halle71
-rw-r--r--contrib/package/community-profiles/files/etc/config/profile_hameln15
-rw-r--r--contrib/package/community-profiles/files/etc/config/profile_hooge22
-rw-r--r--contrib/package/community-profiles/files/etc/config/profile_kiberpipa15
-rw-r--r--contrib/package/community-profiles/files/etc/config/profile_kyritz57
-rw-r--r--contrib/package/community-profiles/files/etc/config/profile_l5925
-rw-r--r--contrib/package/community-profiles/files/etc/config/profile_leipzig55
-rw-r--r--contrib/package/community-profiles/files/etc/config/profile_marburg12
-rw-r--r--contrib/package/community-profiles/files/etc/config/profile_oldenburg15
-rw-r--r--contrib/package/community-profiles/files/etc/config/profile_openwireless_bern18
-rw-r--r--contrib/package/community-profiles/files/etc/config/profile_piraten_dresden12
-rw-r--r--contrib/package/community-profiles/files/etc/config/profile_potsdam35
-rw-r--r--contrib/package/community-profiles/files/etc/config/profile_reihen25
-rw-r--r--contrib/package/community-profiles/files/etc/config/profile_rosbach15
-rw-r--r--contrib/package/community-profiles/files/etc/config/profile_schwarzach12
-rw-r--r--contrib/package/community-profiles/files/etc/config/profile_stuttgart13
-rw-r--r--contrib/package/community-profiles/files/etc/config/profile_tulumlibre10
-rw-r--r--contrib/package/community-profiles/files/etc/config/profile_vogtland23
-rw-r--r--contrib/package/community-profiles/files/etc/config/profile_weil23
-rw-r--r--contrib/package/community-profiles/files/etc/config/profile_weimar10
-rw-r--r--contrib/package/community-profiles/files/etc/config/profile_weinstadt19
-rw-r--r--contrib/package/community-profiles/files/etc/config/profile_wlanljubljana15
-rw-r--r--contrib/package/freifunk-common/Makefile43
-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
-rw-r--r--contrib/package/freifunk-firewall/Makefile53
-rw-r--r--contrib/package/freifunk-firewall/files/etc/firewall.freifunk40
-rw-r--r--contrib/package/freifunk-firewall/files/etc/hotplug.d/firewall/23-restricted-wan65
-rw-r--r--contrib/package/freifunk-gwcheck/Makefile40
-rw-r--r--contrib/package/freifunk-gwcheck/files/etc/config/freifunk-gwcheck5
-rwxr-xr-xcontrib/package/freifunk-gwcheck/files/usr/sbin/ff_olsr_test_gw.sh132
-rw-r--r--contrib/package/freifunk-gwcheck/root/etc/uci-defaults/50_freifunk-gwcheck7
-rw-r--r--contrib/package/freifunk-mapupdate/Makefile39
-rw-r--r--contrib/package/freifunk-mapupdate/files/etc/config/freifunk-mapupdate3
-rwxr-xr-xcontrib/package/freifunk-mapupdate/files/usr/sbin/ff_mapupdate.sh59
-rw-r--r--contrib/package/freifunk-mapupdate/root/etc/uci-defaults/50_freifunk-mapupdate6
-rw-r--r--contrib/package/freifunk-policyrouting/Makefile47
-rw-r--r--contrib/package/freifunk-policyrouting/files/etc/config/freifunk-policyrouting7
-rw-r--r--contrib/package/freifunk-policyrouting/files/etc/hotplug.d/iface/30-policyrouting104
-rwxr-xr-xcontrib/package/freifunk-policyrouting/files/etc/init.d/freifunk-policyrouting172
-rw-r--r--contrib/package/freifunk-policyrouting/files/etc/uci-defaults/freifunk-policyrouting7
-rw-r--r--contrib/package/freifunk-watchdog/Makefile55
-rw-r--r--contrib/package/freifunk-watchdog/files/freifunk-watchdog.config7
-rwxr-xr-xcontrib/package/freifunk-watchdog/files/freifunk-watchdog.init39
-rw-r--r--contrib/package/freifunk-watchdog/src/Makefile12
-rw-r--r--contrib/package/freifunk-watchdog/src/ucix.c102
-rw-r--r--contrib/package/freifunk-watchdog/src/ucix.h29
-rw-r--r--contrib/package/freifunk-watchdog/src/watchdog.c527
-rw-r--r--contrib/package/freifunk-watchdog/src/watchdog.h142
-rw-r--r--contrib/package/freifunk-watchdog/src/wireless.22.h1139
-rw-r--r--contrib/package/meshwizard/Makefile39
-rw-r--r--contrib/package/meshwizard/files/etc/config/meshwizard7
-rw-r--r--contrib/package/meshwizard/files/usr/bin/meshwizard/functions.sh118
-rwxr-xr-xcontrib/package/meshwizard/files/usr/bin/meshwizard/helpers/check-range-in-range.sh31
-rw-r--r--contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/common.awk20
-rwxr-xr-xcontrib/package/meshwizard/files/usr/bin/meshwizard/helpers/gen_auto-ipv6-dhcpv6-ip.sh16
-rwxr-xr-xcontrib/package/meshwizard/files/usr/bin/meshwizard/helpers/gen_bssid.sh36
-rwxr-xr-xcontrib/package/meshwizard/files/usr/bin/meshwizard/helpers/gen_dhcp_ip.sh6
-rwxr-xr-xcontrib/package/meshwizard/files/usr/bin/meshwizard/helpers/initial_config.sh42
-rwxr-xr-xcontrib/package/meshwizard/files/usr/bin/meshwizard/helpers/ipcalc-cidr.sh42
-rwxr-xr-xcontrib/package/meshwizard/files/usr/bin/meshwizard/helpers/read_defaults.sh61
-rwxr-xr-xcontrib/package/meshwizard/files/usr/bin/meshwizard/helpers/rename-wifi.sh46
-rwxr-xr-xcontrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_auto-ipv6-interface.sh12
-rwxr-xr-xcontrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_auto-ipv6.sh17
-rwxr-xr-xcontrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_dhcp.sh46
-rwxr-xr-xcontrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_dnsmasq.sh29
-rwxr-xr-xcontrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_firewall.sh145
-rwxr-xr-xcontrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_firewall_interface.sh111
-rwxr-xr-xcontrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_lan_ipv6.sh20
-rwxr-xr-xcontrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_lan_static.sh17
-rwxr-xr-xcontrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_network.sh142
-rwxr-xr-xcontrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_olsrd.sh160
-rwxr-xr-xcontrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_olsrd_interface.sh76
-rwxr-xr-xcontrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_policyrouting.sh11
-rwxr-xr-xcontrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_qos.sh17
-rwxr-xr-xcontrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_splash.sh54
-rwxr-xr-xcontrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_ssh.sh26
-rwxr-xr-xcontrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_system.sh7
-rwxr-xr-xcontrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_uhttpd.sh11
-rwxr-xr-xcontrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_wan_dhcp.sh18
-rwxr-xr-xcontrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_wan_static.sh20
-rwxr-xr-xcontrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_widgets.sh14
-rwxr-xr-xcontrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_wifi.sh80
-rwxr-xr-xcontrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_wifi_vap.sh23
-rwxr-xr-xcontrib/package/meshwizard/files/usr/bin/meshwizard/helpers/supports_vap.sh32
-rwxr-xr-xcontrib/package/meshwizard/files/usr/bin/meshwizard/wizard.sh147
112 files changed, 0 insertions, 6060 deletions
diff --git a/contrib/package/community-profiles/Makefile b/contrib/package/community-profiles/Makefile
deleted file mode 100644
index 1992b7c3b..000000000
--- a/contrib/package/community-profiles/Makefile
+++ /dev/null
@@ -1,39 +0,0 @@
-# Copyright (C) 2011 Manuel Munz <freifunk at somakoma de>
-# This is free software, licensed under the Apache 2.0 license.
-
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=community-profiles
-PKG_RELEASE:=2
-
-PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
-
-include $(INCLUDE_DIR)/package.mk
-
-define Package/community-profiles
- SECTION:=luci
- CATEGORY:=LuCI
- SUBMENU:=9. Freifunk
- TITLE:=Community profiles
- DEPENDS:=freifunk-common
-endef
-
-define Package/community-profiles/description
- These community profiles set defaults for various free network/freifunk communities and are used by wizards like ffwizard and meshwizard.
-endef
-
-define Build/Prepare
- mkdir -p $(PKG_BUILD_DIR)
-endef
-
-define Build/Configure
-endef
-
-define Build/Compile
-endef
-
-define Package/community-profiles/install
- $(CP) ./files/* $(1)/
-endef
-
-$(eval $(call BuildPackage,community-profiles))
diff --git a/contrib/package/community-profiles/files/etc/config/profile_Freifunk b/contrib/package/community-profiles/files/etc/config/profile_Freifunk
deleted file mode 100644
index b8f445a73..000000000
--- a/contrib/package/community-profiles/files/etc/config/profile_Freifunk
+++ /dev/null
@@ -1,10 +0,0 @@
-config 'community' 'profile'
- option 'name' 'Freifunk'
- option 'homepage' 'http://freifunk.net'
- option 'ssid' 'www.freifunk.net'
- option 'splash_network' '10.104.0.0/16'
- option 'latitude' '52.000'
- option 'longitude' '10.000'
- option 'splash_prefix' '28'
- option 'mesh_network' '10.0.0.0/8'
-
diff --git a/contrib/package/community-profiles/files/etc/config/profile_altmark b/contrib/package/community-profiles/files/etc/config/profile_altmark
deleted file mode 100644
index 20d51b2fd..000000000
--- a/contrib/package/community-profiles/files/etc/config/profile_altmark
+++ /dev/null
@@ -1,56 +0,0 @@
-config 'community' 'profile'
- option 'name' 'Freifunk Altmark'
- option 'homepage' 'http://altmark.freifunk.net'
- option 'ssid' 'altmark.freifunk.net'
- option 'mesh_network' '10.59.0.0/16'
- option 'latitude' '52.885'
- option 'longitude' '11.15'
- option 'suffix' 'olsr.altmark.freifunk.net'
- option 'vap' '1'
- option 'adhoc_dhcp_when_vap' '0'
-
-config 'defaults' 'interface'
- option 'netmask' '255.255.255.255'
-
-
-config 'defaults' 'bssidscheme'
- option '1' '02:CA:FF:EE:BA:BE'
- option '40' '02:40:CA:FF:EE:EE'
-
-config 'defaults' 'wifi_device'
- option 'country' 'DE'
-
-config 'defaults' 'wifi_iface'
- option 'mcast_rate' '6000'
-
-config 'defaults' 'olsrd'
- option 'LinkQualityAlgorithm' 'etx_ff'
-
-
-config widget 'customindex'
- option enabled '1'
- option width '50%'
- option paddingright '5%'
- option template 'html'
-
-config widget 'rssffl'
- option enabled '1'
- option max '10'
- option cache '3600'
- option width '100%'
- option title 'Freifunk Blog'
- option template 'iframe'
- option url 'http://freifunk.net'
-
-config widget 'rssbundesweit'
- option cache '3600'
- option width '50%'
- option title 'bundesweiter Freifunk Blog'
- option template 'rssfeed'
- option enabled '1'
- option max '10'
- option url 'http://blog.freifunk.net/rss.xml'
-
-config widget 'clear1'
- option template 'clear'
- option enabled '1'
diff --git a/contrib/package/community-profiles/files/etc/config/profile_arig_arad b/contrib/package/community-profiles/files/etc/config/profile_arig_arad
deleted file mode 100644
index 55d012fb9..000000000
--- a/contrib/package/community-profiles/files/etc/config/profile_arig_arad
+++ /dev/null
@@ -1,22 +0,0 @@
-config 'community' 'profile'
- option 'name' 'arig Arad'
- option 'homepage' 'http://arig.org.il'
- option 'ssid' 'arig.org.il'
- option 'latitude' '31.26'
- option 'longitude' '35.21'
- option 'splash_prefix' '28'
- option 'suffix' 'arig'
- option 'mesh_network' '10.81.8.0/22'
-
-config 'defaults' 'bssidscheme'
- option '1' '02:CA:FF:EE:BA:BE'
- option '13' '13:CA:FF:EE:BA:BE'
-
-config 'defaults' 'wifi_device'
- option 'channel' '13'
- option 'country' 'IL'
- option 'beacon_int' '5000'
- option 'distance' '1500'
-
-config 'defaults' 'wifi_iface'
- option 'mcast_rate' '6000'
diff --git a/contrib/package/community-profiles/files/etc/config/profile_arig_neot_semadar b/contrib/package/community-profiles/files/etc/config/profile_arig_neot_semadar
deleted file mode 100644
index 062b18e20..000000000
--- a/contrib/package/community-profiles/files/etc/config/profile_arig_neot_semadar
+++ /dev/null
@@ -1,22 +0,0 @@
-config 'community' 'profile'
- option 'name' 'arig Neot Semadar'
- option 'homepage' 'http://www.neot-semadar.com'
- option 'ssid' 'arig.org.il'
- option 'latitude' '30.05'
- option 'longitude' '35.02'
- option 'splash_prefix' '272'
- option 'suffix' 'arig'
- option 'mesh_network' '10.81.12.0/22'
-
-config 'defaults' 'bssidscheme'
- option '1' '02:CA:FF:EE:BA:BE'
- option '13' '13:CA:FF:EE:BA:BE'
-
-config 'defaults' 'wifi_device'
- option 'channel' '13'
- option 'country' 'IL'
- option 'beacon_int' '5000'
- option 'distance' '1500'
-
-config 'defaults' 'wifi_iface'
- option 'mcast_rate' '6000'
diff --git a/contrib/package/community-profiles/files/etc/config/profile_arig_tel-aviv b/contrib/package/community-profiles/files/etc/config/profile_arig_tel-aviv
deleted file mode 100644
index fe7df226d..000000000
--- a/contrib/package/community-profiles/files/etc/config/profile_arig_tel-aviv
+++ /dev/null
@@ -1,22 +0,0 @@
-config 'community' 'profile'
- option 'name' 'arig Tel Aviv'
- option 'homepage' 'http://arig.org.il'
- option 'ssid' 'arig.org.il'
- option 'latitude' '32.056'
- option 'longitude' '34.772'
- option 'splash_prefix' '28'
- option 'suffix' 'arig'
- option 'mesh_network' '10.81.0.0/21'
-
-config 'defaults' 'bssidscheme'
- option '1' '02:CA:FF:EE:BA:BE'
- option '13' '13:CA:FF:EE:BA:BE'
-
-config 'defaults' 'wifi_device'
- option 'channel' '13'
- option 'country' 'IL'
- option 'beacon_int' '5000'
- option 'distance' '1500'
-
-config 'defaults' 'wifi_iface'
- option 'mcast_rate' '6000'
diff --git a/contrib/package/community-profiles/files/etc/config/profile_augsburg b/contrib/package/community-profiles/files/etc/config/profile_augsburg
deleted file mode 100644
index 4ab82cf5d..000000000
--- a/contrib/package/community-profiles/files/etc/config/profile_augsburg
+++ /dev/null
@@ -1,64 +0,0 @@
-config 'community' 'profile'
- option 'name' 'Freifunk Augsburg'
- option 'homepage' 'http://augsburg.freifunk.net'
- option 'ssid' 'augsburg.freifunk.net'
- option 'mesh_network' '10.11.0.0/18'
- option 'splash_network' '10.104.0.0/16'
- option 'latitude' '48.37071'
- option 'longitude' '10.89475'
- option 'suffix' 'ffa'
- option 'splash_prefix' '27'
- option 'vap' '1'
- option adhoc_dhcp_when_vap '1'
- option 'ipv6' '1'
- option 'ipv6_config' 'auto-ipv6-fromv4'
- option 'ipv6_prefix' 'fdca:ffee:ffa::/48'
- #option 'extrapackages' ''
-
-config 'defaults' 'interface'
- option 'netmask' '255.255.192.0'
-
-config 'defaults' 'bssidscheme'
- option '1' '02:CA:FF:EE:BA:BE'
-
-config 'defaults' 'luci_splash'
- option 'limit_up' '40'
- option 'limit_down' '120'
- option 'leasetime' '8'
-
-config widget 'customindex'
- option enabled '1'
- option width '50%'
- option paddingright '5%'
- option template 'html'
-
-config widget 'rssffa'
- option enabled '1'
- option max '10'
- option cache '3600'
- option width '50%'
- option title 'Freifunk Augsburg Blog'
- option template 'rssfeed'
- option url 'http://augsburg.freifunk.net/blog?type=100'
-
-config widget 'rssaugsburg'
- option cache '3600'
- option width '50%'
- option title 'Augsburger Blogs'
- option template 'rssfeed'
- option enabled '1'
- option max '10'
- option url 'http://wgaugsburg.de/augsburg/rss20.xml'
-
-config widget 'search'
- option template 'search'
- option title 'Search'
- option enabled '1'
- option width '50%'
- list engine 'Google|http://www.google.de/search?q='
- list engine 'Freifunk&#160;Augsburg|http://www.google.de/search?q=site:augsburg.freifunk.net+'
- list engine 'Freifunk&#160;Wiki|http://wiki.freifunk.net/index.php?search='
-
-config widget 'clear1'
- option template 'clear'
- option enabled '1'
diff --git a/contrib/package/community-profiles/files/etc/config/profile_bayreuth b/contrib/package/community-profiles/files/etc/config/profile_bayreuth
deleted file mode 100644
index 90fccbd81..000000000
--- a/contrib/package/community-profiles/files/etc/config/profile_bayreuth
+++ /dev/null
@@ -1,20 +0,0 @@
-config 'community' 'profile'
- option 'name' 'Freifunk Bayreuth'
- option 'homepage' 'http://bayreuth.freifunk.net'
- option 'ssid' 'bayreuth.freifunk.net'
- option 'mesh_network' '10.195.0.0/16'
- option 'splash_network' '10.104.0.0/16'
- option 'latitude' '49.945812'
- option 'longitude' '11.575045'
- option 'suffix' 'ffbt'
- option 'splash_prefix' '28'
-
-config 'defaults' 'interface'
- option 'netmask' '255.255.192.0'
-
-config 'defaults' 'wifi_device'
- option 'channel' '4'
-
-config 'defaults' 'wifi_iface'
- option 'bssid' '42:CA:FF:EE:BA:BE'
-
diff --git a/contrib/package/community-profiles/files/etc/config/profile_bergischesland b/contrib/package/community-profiles/files/etc/config/profile_bergischesland
deleted file mode 100644
index 0de454303..000000000
--- a/contrib/package/community-profiles/files/etc/config/profile_bergischesland
+++ /dev/null
@@ -1,15 +0,0 @@
-config 'community' 'profile'
- option 'name' 'Piratenfreifunk Bergisches Land'
- option 'homepage' 'http://www.piraten-bergisches-land.de'
- option 'ssid' 'PiratenfunkBL'
- option 'mesh_network' '10.3.0.0/16'
- option 'splash_network' '192.168.0.0/16'
- option 'splash_prefix' '27'
- option 'latitude' '51.26849'
- option 'longitude' '7.19476'
-
-config 'defaults' 'wifi_device'
- option 'channel' '11'
-
-config 'defaults' 'wifi_iface'
- option 'bssid' '02:40:00:42:42:42'
diff --git a/contrib/package/community-profiles/files/etc/config/profile_berlin b/contrib/package/community-profiles/files/etc/config/profile_berlin
deleted file mode 100644
index e4388c76e..000000000
--- a/contrib/package/community-profiles/files/etc/config/profile_berlin
+++ /dev/null
@@ -1,39 +0,0 @@
-config 'community' 'profile'
- option 'name' 'Freifunk Berlin'
- option 'homepage' 'http://berlin.freifunk.net'
- option 'ssid' 'berlin.freifunk.net'
- option 'ssid_scheme' 'addchannelbefore'
- option 'mesh_network' '10.0.0.0/8'
- option 'splash_network' '10.104.0.0/16'
- option 'splash_prefix' '27'
- option 'latitude' '52.52075'
- option 'longitude' '13.40948'
- option 'owm_api' 'http://util.berlin.freifunk.net'
-
-config 'defaults' 'wifi_device'
- option 'channel' '13'
-
-config 'defaults' 'wifi_device_5'
- option 'channel' '36'
-
-config 'defaults' 'wifi_iface'
- option 'mcast_rate' '6000'
-
-config 'defaults' 'wifi_iface_5'
- option 'mcast_rate' '12000'
-
-config 'defaults' 'bssidscheme'
- option '10' '02:CA:FF:EE:BA:BE'
- option '13' 'D2:CA:FF:EE:BA:BE'
- option '36' '02:36:CA:FF:EE:EE'
-
-config 'defaults' 'ssidscheme'
- option '13' 'intern-ch13.freifunk.net'
- option '36' 'intern-ch36.freifunk.net'
-
-config 'defaults' 'interface'
- option 'netmask' '255.255.255.255'
- option 'dns' '85.214.20.141 80.67.169.40 194.150.168.168 2001:4ce8::53 2001:910:800::12'
-
-config 'dhcp' 'dhcp'
- option leasetime '5m'
diff --git a/contrib/package/community-profiles/files/etc/config/profile_carbodebit b/contrib/package/community-profiles/files/etc/config/profile_carbodebit
deleted file mode 100644
index 0b263f9c0..000000000
--- a/contrib/package/community-profiles/files/etc/config/profile_carbodebit
+++ /dev/null
@@ -1,23 +0,0 @@
-config 'community' 'profile'
- option 'name' 'carbodebit'
- option 'homepage' 'http://carbodebit.net'
- option 'ssid' 'VHDCARBES'
- option 'mesh_network' '10.72.1.0/24'
- option 'latitude' '43.633683'
- option 'longitude' '2.160894'
-
-config 'defaults' 'wifi_iface'
- option 'bssid' 'DE:78:70:E4:FA:B8'
-
-config 'defaults' 'interface'
- option 'netmask' '255.255.255.0'
- option 'dns' '10.70.1.1 213.190.64.170 213.190.64.166'
-
-config 'defaults' 'wifi_device'
- option 'channel' '11'
- option 'country' 'FR'
- option 'distance' '2000'
-
-config 'defaults' 'bssidscheme'
- option 'all' 'DE:78:70:E4:FA:B8'
-
diff --git a/contrib/package/community-profiles/files/etc/config/profile_cottbus b/contrib/package/community-profiles/files/etc/config/profile_cottbus
deleted file mode 100644
index 6c7f4b696..000000000
--- a/contrib/package/community-profiles/files/etc/config/profile_cottbus
+++ /dev/null
@@ -1,37 +0,0 @@
-config 'community' 'profile'
- option 'name' 'Freifunk Cottbus'
- option 'homepage' 'http://cottbus.freifunk.net'
- option 'ssid' 'cottbus.freifunk.net'
- option 'ssid_scheme' 'ssidonly'
- option 'mesh_network' '10.35.0.0/16'
- option 'splash_network' '10.104.0.0/16'
- option 'splash_prefix' '27'
- option 'latitude' '51.757689'
- option 'longitude' '13.40948'
-
-config 'defaults' 'wifi_device'
- option 'channel' '13'
-
-config 'defaults' 'wifi_device_5'
- option 'channel' '36'
-
-config 'defaults' 'wifi_iface'
- option 'mcast_rate' '6000'
-
-config 'defaults' 'wifi_iface_5'
- option 'mcast_rate' '12000'
-
-config 'defaults' 'bssidscheme'
- option '13' 'D2:CA:FF:EE:BA:BE'
- option '36' '02:36:CA:FF:EE:EE'
-
-config 'defaults' 'ssidscheme'
- option '13' 'intern-ch13.cottbus.freifunk.net'
- option '36' 'intern-ch36.cottbus.freifunk.net'
-
-config 'defaults' 'interface'
- option 'netmask' '255.255.255.255'
- option 'dns' '85.214.20.141 80.67.169.40 194.150.168.168 2001:4ce8::53 2001:910:800::12'
-
-config 'dhcp' 'dhcp'
- option 'leasetime' '5m'
diff --git a/contrib/package/community-profiles/files/etc/config/profile_demo b/contrib/package/community-profiles/files/etc/config/profile_demo
deleted file mode 100644
index c11a74f26..000000000
--- a/contrib/package/community-profiles/files/etc/config/profile_demo
+++ /dev/null
@@ -1,21 +0,0 @@
-config 'community' 'profile'
- option 'name' 'Freifunk Demo'
- option 'homepage' 'http://www.freifunk.net'
- option 'ssid' 'demo.freifunk.net'
- option 'mesh_network' '10.11.12.0/24'
- option 'latitude' '51.163375'
- option 'longitude' '10.447683'
- option 'suffix' 'ff'
- option 'vap' '1'
- option adhoc_dhcp_when_vap '1'
- option 'ipv6' '1'
- option 'ipv6_config' 'auto-ipv6-fromv4'
- option 'ipv6_prefix' 'fdca:ffff:ffff::/48'
- #option 'extrapackages' ''
-
-config 'defaults' 'interface'
- option 'netmask' '255.255.255.0'
-
-config 'defaults' 'luci_splash'
- option 'limit_up' '50'
- option 'limit_down' '200'
diff --git a/contrib/package/community-profiles/files/etc/config/profile_duesseldorf b/contrib/package/community-profiles/files/etc/config/profile_duesseldorf
deleted file mode 100644
index cb36aabf6..000000000
--- a/contrib/package/community-profiles/files/etc/config/profile_duesseldorf
+++ /dev/null
@@ -1,15 +0,0 @@
-config 'community' 'profile'
- option 'name' 'Freifunk Duesseldorf'
- option 'homepage' 'http://freifunk-duesseldorf.de'
- option 'ssid' 'duesseldorf.freifunk.net'
- option 'mesh_network' '10.40.0.0/16'
- option 'splash_network' '10.104.0.0/16'
- option 'splash_prefix' '27'
- option 'latitude' '51.217812'
- option 'longitude' '6.761564'
-
-config 'defaults' 'wifi_device'
- option 'channel' '3'
-
-config 'defaults' 'wifi_iface'
- option 'bssid' '02:CA:FF:EE:BA:BE'
diff --git a/contrib/package/community-profiles/files/etc/config/profile_erfurt b/contrib/package/community-profiles/files/etc/config/profile_erfurt
deleted file mode 100644
index dba31a0b0..000000000
--- a/contrib/package/community-profiles/files/etc/config/profile_erfurt
+++ /dev/null
@@ -1,48 +0,0 @@
-config 'community' 'profile'
- option 'name' 'Freifunk Erfurt'
- option 'homepage' 'http://erfurt.freifunk.net'
- option 'ssid' 'erfurt.freifunk.net'
- option 'mesh_network' '10.99.0.0/16'
- option 'latitude' '50.9768'
- option 'longitude' '11.02367'
- option 'suffix' 'olsr.erfurt.freifunk.net'
- option 'vap' '1'
- option 'adhoc_dhcp_when_vap' '0'
-
-config 'defaults' 'interface'
- option 'netmask' '255.255.0.0'
-
-config 'defaults' 'bssidscheme'
- option '1' '02:CA:FF:EE:BA:BE'
-
-config 'defaults' 'olsrd'
- option 'LinkQualityAlgorithm' 'etx_ff'
-
-
-config widget 'customindex'
- option enabled '1'
- option width '50%'
- option paddingright '5%'
- option template 'html'
-
-config widget 'rssffl'
- option enabled '1'
- option max '10'
- option cache '3600'
- option width '100%'
- option title 'Freifunk Blog'
- option template 'iframe'
- option url 'http://freifunk.net'
-
-config widget 'rssbundesweit'
- option cache '3600'
- option width '50%'
- option title 'bundesweiter Freifunk Blog'
- option template 'rssfeed'
- option enabled '1'
- option max '10'
- option url 'http://blog.freifunk.net/rss.xml'
-
-config widget 'clear1'
- option template 'clear'
- option enabled '1'
diff --git a/contrib/package/community-profiles/files/etc/config/profile_evernet b/contrib/package/community-profiles/files/etc/config/profile_evernet
deleted file mode 100644
index 05453608d..000000000
--- a/contrib/package/community-profiles/files/etc/config/profile_evernet
+++ /dev/null
@@ -1,25 +0,0 @@
-config 'community' 'profile'
- option 'name' 'Freifunk Evernet eG'
- option 'homepage' 'http://www.evernet-eg.de'
- option 'ssid' 'evernet.freifunk.net'
- option 'mesh_network' '10.0.0.0/8'
- option 'latitude' '51.15692062509162'
- option 'longitude' '10.716041922569275'
- option 'suffix' 'evernet'
-
-config 'defaults' 'interface'
- option 'netmask' '255.0.0.0'
-
-config 'defaults' 'bssidscheme'
- option 'all' '02:CA:FF:EE:BA:BE'
-
-config 'defaults' 'wifi_device'
- option 'channel' '13'
- option 'country' 'DE'
- option 'txpower' '19'
- option 'beacon_int' '5000'
- option 'distance' '1500'
- option 'noscan' '0'
-
-config 'defaults' 'wifi_iface'
- option 'mcast_rate' '6000'
diff --git a/contrib/package/community-profiles/files/etc/config/profile_freiburg b/contrib/package/community-profiles/files/etc/config/profile_freiburg
deleted file mode 100644
index eee3d6ad0..000000000
--- a/contrib/package/community-profiles/files/etc/config/profile_freiburg
+++ /dev/null
@@ -1,45 +0,0 @@
-config 'community' 'profile'
- option 'name' 'Freifunk Freiburg'
- option 'homepage' 'http://freiburg.freifunk.net'
- option 'ssid' '02:CA:FF:EE:BA:BE'
- option 'mesh_network' '10.60.0.0/16'
- option 'latitude' '47.994841'
- option 'longitude' '7.849772'
- option 'suffix' 'olsr.freiburg.freifunk.net'
- option 'vap' '1'
- option 'adhoc_dhcp_when_vap' '0'
-
-config 'defaults' 'interface'
- option 'netmask' '255.255.255.255'
-
-config 'defaults' 'bssidscheme'
- option '1' '02:CA:FF:EE:BA:BE'
- option '40' '02:40:CA:FF:EE:EE'
-
-config 'defaults' 'wifi_device'
- option 'country' 'DE'
-
-config 'defaults' 'wifi_iface'
- option 'mcast_rate' '6000'
-
-config 'defaults' 'olsrd'
- option 'LinkQualityAlgorithm' 'etx_ff'
-
-config widget 'customindex'
- option enabled '1'
- option width '50%'
- option paddingright '5%'
- option template 'html'
-
-config widget 'rssbundesweit'
- option cache '3600'
- option width '50%'
- option title 'bundesweiter Freifunk Blog'
- option template 'rssfeed'
- option enabled '1'
- option max '10'
- option url 'http://blog.freifunk.net/rss.xml'
-
-config widget 'clear1'
- option template 'clear'
- option enabled '1'
diff --git a/contrib/package/community-profiles/files/etc/config/profile_fuerstenwalde b/contrib/package/community-profiles/files/etc/config/profile_fuerstenwalde
deleted file mode 100644
index f7df7ba65..000000000
--- a/contrib/package/community-profiles/files/etc/config/profile_fuerstenwalde
+++ /dev/null
@@ -1,38 +0,0 @@
-config 'community' 'profile'
- option 'name' 'Freifunk Fürstenwalde'
- option 'homepage' 'http://fuerstenwalde.freifunk.net'
- option 'ssid' 'fuerstenwalde.freifunk.net'
- option 'ssid_scheme' 'addchannelbefore'
- option 'mesh_network' '10.0.0.0/8'
- option 'splash_network' '10.104.0.0/16'
- option 'splash_prefix' '27'
- option 'latitude' '52.35844'
- option 'longitude' '14.063696'
- option 'owm_api' 'http://util.berlin.freifunk.net'
-
-config 'defaults' 'wifi_device'
- option 'channel' '13'
-
-config 'defaults' 'wifi_device_5'
- option 'channel' '36'
-
-config 'defaults' 'wifi_iface'
- option 'mcast_rate' '6000'
-
-config 'defaults' 'wifi_iface_5'
- option 'mcast_rate' '12000'
-
-config 'defaults' 'bssidscheme'
- option '13' 'D2:CA:FF:EE:BA:BE'
- option '36' '02:36:CA:FF:EE:EE'
-
-config 'defaults' 'ssidscheme'
- option '13' 'intern-ch13.freifunk.net'
- option '36' 'intern-ch36.freifunk.net'
-
-config 'defaults' 'interface'
- option 'netmask' '255.255.255.255'
- option 'dns' '85.214.20.141 80.67.169.40 194.150.168.168 2001:4ce8::53 2001:910:800::12'
-
-config 'dhcp' 'dhcp'
-option leasetime '5m'
diff --git a/contrib/package/community-profiles/files/etc/config/profile_gadow b/contrib/package/community-profiles/files/etc/config/profile_gadow
deleted file mode 100644
index bc4a2036c..000000000
--- a/contrib/package/community-profiles/files/etc/config/profile_gadow
+++ /dev/null
@@ -1,23 +0,0 @@
-config 'community' 'profile'
- option 'name' 'Freifunk Gadow'
- option 'homepage' 'http://gadow.freifunk.net'
- option 'ssid' 'gadow.freifunk.net'
- option 'mesh_network' '10.61.0.0/16'
- option 'latitude' '53.11'
- option 'longitude' '12.61'
- option 'vap' '1'
- option 'adhoc_dhcp_when_vap' '0'
-
-config 'defaults' 'interface'
- option 'netmask' '255.255.255.255'
-
-
-config 'defaults' 'bssidscheme'
- option '1' '02:CA:FF:EE:BA:BE'
- option '40' '02:40:CA:FF:EE:EE'
-
-config 'defaults' 'wifi_device'
- option 'country' 'DE'
-
-config 'defaults' 'wifi_iface'
- option 'mcast_rate' '6000'
diff --git a/contrib/package/community-profiles/files/etc/config/profile_guifibages b/contrib/package/community-profiles/files/etc/config/profile_guifibages
deleted file mode 100644
index a0fc4fc1e..000000000
--- a/contrib/package/community-profiles/files/etc/config/profile_guifibages
+++ /dev/null
@@ -1,19 +0,0 @@
-config 'community' 'profile'
- option 'name' 'Guifi Bages'
- option 'homepage' 'http://guifi.net/PlaBages'
- option 'ssid' 'guifibages'
- option 'mesh_network' '10.224.3.0/16'
- option 'splash_network' '10.104.0.0/16'
- option 'theme' 'luci-theme-freifunk-generic'
- option 'latitude' '41.718437'
- option 'longitude' '1.826477'
- option 'suffix' 'guifibages.cat'
- option 'splash_prefix' '27'
- option 'extrapackages' 'luci-app-olsr-viz luci-i18n-catalan'
-
-config 'defaults' 'interface'
- option 'netmask' '255.255.0.0'
-
-config 'defaults' 'bssidscheme'
- option 'all' '12:34:56:78:9a:bc'
-
diff --git a/contrib/package/community-profiles/files/etc/config/profile_halle b/contrib/package/community-profiles/files/etc/config/profile_halle
deleted file mode 100644
index 30d0e8fa4..000000000
--- a/contrib/package/community-profiles/files/etc/config/profile_halle
+++ /dev/null
@@ -1,71 +0,0 @@
-config 'community' 'profile'
- option 'name' 'Freifunk Halle'
- option 'homepage' 'http://freifunk-halle.org'
- option 'ssid' 'halle.freifunk.net'
- option 'mesh_network' '10.62.0.0/16'
- option 'splash_network' '6.0.0.0/8'
- option 'splash_prefix' '27'
- option 'latitude' '51.47911'
- option 'longitude' '11.96901'
- option 'adhoc_dhcp_when_vap' '0'
- option 'suffix' 'ffhal'
- option 'vap' '1'
- option 'batman' '1'
-
-config 'defaults' 'wifi_device'
- option 'channel' '13'
- option 'country' 'DE'
-
-config 'defaults' 'bssidscheme'
- option 'all' '02:CA:FF:EE:BA:BE'
-
-config 'defaults' 'luci_splash'
- option 'redirect_url' 'http://freifunk-halle.org/willkommen.php'
-
-config 'defaults' 'interface'
- option 'netmask' '255.255.255.255'
-
-config 'defaults' 'wifi_iface'
- option 'mcast_rate' '6000'
-
-config 'defaults' 'dhcp'
- option 'leasetime' '5m'
-
-config 'defaults' 'olsrd'
- option 'AllowNoInt' 'yes'
- option 'FIBMetric' 'flat'
- option 'Pollrate' '0.025'
- option 'TcRedundancy' '2'
- option 'NatThreshold' '0.75'
- option 'LinkQualityAlgorithm' 'etx_ff'
- option 'LinkQualityFishEye' '1'
- option 'Willingness' '3'
-
-config 'defaults' 'olsr_interface'
- option 'Ip4Broadcast' '255.255.255.255'
- option 'HelloInterval' '5.0'
- option 'HelloValidityTime' '125.0'
- option 'TcInterval' '3.0'
- option 'TcValidityTime' '375.0'
- option 'MidInterval' '25.0'
- option 'MidValidityTime' '375.0'
- option 'HnaInterval' '25.0'
- option 'HnaValidityTime' '375.0'
-
-config widget 'rsshalle'
- option cache '3600'
- option width '50%'
- option title 'neuste Foreneinträge in Halle'
- option template 'rssfeed'
- option enabled '1'
- option max '5'
- option url 'http://www.freifunk-halle.org/rss.php'
-
-config widget 'rssbundesweit'
- option cache '3600'
- option width '50%'
- option title 'bundesweiter Freifunk Blog'
- option template 'rssfeed'
- option enabled '1'
- option max '10'
- option url 'http://blog.freifunk.net/rss.xml'
diff --git a/contrib/package/community-profiles/files/etc/config/profile_hameln b/contrib/package/community-profiles/files/etc/config/profile_hameln
deleted file mode 100644
index f305b597a..000000000
--- a/contrib/package/community-profiles/files/etc/config/profile_hameln
+++ /dev/null
@@ -1,15 +0,0 @@
-config 'community' 'profile'
- option 'name' 'Hameln'
- option 'homepage' 'http://freifunk-hameln.de'
- option 'ssid' 'hameln.freifunk.net'
- option 'suffix' 'ffhm'
- option 'latitude' '52.1030706'
- option 'longitude' '9.3514778'
- option 'mesh_network' '10.31.0.0/16'
- option 'splash_network' '10.104.0.0/16'
- option 'splash_prefix' '27'
- option 'vap' '1'
- option adhoc_dhcp_when_vap '1'
-
-config 'defaults' 'interface'
- option 'netmask' '255.255.0.0'
diff --git a/contrib/package/community-profiles/files/etc/config/profile_hooge b/contrib/package/community-profiles/files/etc/config/profile_hooge
deleted file mode 100644
index 62f6fa9af..000000000
--- a/contrib/package/community-profiles/files/etc/config/profile_hooge
+++ /dev/null
@@ -1,22 +0,0 @@
-config 'community' 'profile'
- option 'name' 'Freifunk Hooge'
- option 'homepage' 'http://hooge.freifunk.net'
- option 'ssid' 'hooge.freifunk.net'
- option 'mesh_network' '10.11.128.0/24'
- option 'splash_network' '10.104.0.0/16'
- option 'latitude' '54.572161'
- option 'longitude' '8.559551'
- option 'suffix' 'hooge'
- option 'splash_prefix' '27'
- option 'vap' '1'
- option 'extrapackages' ''
- list 'owm_api' 'http://api.openwifimap.net'
- list 'owm_api' 'http://owmapi.pberg.freifunk.net'
- option 'mapserver' 'http://openwifimap.net/'
-
-config 'defaults' 'interface'
- option 'netmask' '255.255.255.0'
-
-config 'defaults' 'luci_splash'
- option 'limit_up' '20'
- option 'limit_down' '50'
diff --git a/contrib/package/community-profiles/files/etc/config/profile_kiberpipa b/contrib/package/community-profiles/files/etc/config/profile_kiberpipa
deleted file mode 100644
index c2a96e47c..000000000
--- a/contrib/package/community-profiles/files/etc/config/profile_kiberpipa
+++ /dev/null
@@ -1,15 +0,0 @@
-config 'community' 'profile'
- option 'name' 'Kiberpipa.net'
- option 'homepage' 'http://www.kiberpipa.net'
- option 'ssid' 'open.kiberpipa.net'
- option 'mesh_network' '10.14.0.0/16'
- option 'splash_network' '10.14.128.0/17'
- option 'splash_prefix' '27'
- option 'latitude' '46.05063'
- option 'longitude' '14.50402'
-
-config 'defaults' 'wifi_device'
- option 'channel' '8'
-
-config 'defaults' 'interface'
- option 'dns' '10.14.0.1 208.67.222.220 208.67.220.222'
diff --git a/contrib/package/community-profiles/files/etc/config/profile_kyritz b/contrib/package/community-profiles/files/etc/config/profile_kyritz
deleted file mode 100644
index f97e79f9c..000000000
--- a/contrib/package/community-profiles/files/etc/config/profile_kyritz
+++ /dev/null
@@ -1,57 +0,0 @@
-config 'community' 'profile'
- option 'name' 'Freifunk Kyritz'
- option 'homepage' 'http://kyritz.freifunk.net'
- option 'ssid' 'mesh.freifunk.net'
- option 'mesh_network' '104.59.0.0/16'
- option 'latitude' '52.94'
- option 'longitude' '12.4'
- option 'suffix' 'olsr.kyritz.freifunk.net'
- option 'vap' '1'
- option 'adhoc_dhcp_when_vap' '0'
-
-config 'defaults' 'interface'
- option 'netmask' '255.255.255.255'
-
-
-config 'defaults' 'bssidscheme'
- option '1' '02:CA:FF:EE:BA:BE'
- option '40' '02:40:CA:FF:EE:EE'
-
-config 'defaults' 'wifi_device'
- option 'country' 'DE'
-
-config 'defaults' 'wifi_iface'
- option 'mcast_rate' '6000'
-
-
-config 'defaults' 'olsrd'
- option 'LinkQualityAlgorithm' 'etx_ff'
-
-
-config widget 'customindex'
- option enabled '1'
- option width '50%'
- option paddingright '5%'
- option template 'html'
-
-config widget 'rssffl'
- option enabled '1'
- option max '10'
- option cache '3600'
- option width '100%'
- option title 'Freifunk Blog'
- option template 'iframe'
- option url 'http://freifunk.net'
-
-config widget 'rssbundesweit'
- option cache '3600'
- option width '50%'
- option title 'bundesweiter Freifunk Blog'
- option template 'rssfeed'
- option enabled '1'
- option max '10'
- option url 'http://blog.freifunk.net/rss.xml'
-
-config widget 'clear1'
- option template 'clear'
- option enabled '1'
diff --git a/contrib/package/community-profiles/files/etc/config/profile_l59 b/contrib/package/community-profiles/files/etc/config/profile_l59
deleted file mode 100644
index 5e6f472ba..000000000
--- a/contrib/package/community-profiles/files/etc/config/profile_l59
+++ /dev/null
@@ -1,25 +0,0 @@
-config 'community' 'profile'
- option 'name' 'Freifunk L59'
- option 'homepage' 'http://freifunk.net'
- option 'ssid' 'freifunk.net'
- option 'mesh_network' '10.59.0.0/16'
- option 'splash_network' '6.59.0.0/16'
- option 'splash_prefix' '27'
- option 'latitude' '52.26337'
- option 'longitude' '10.52103'
- option 'vap' '1'
- option 'adhoc_dhcp_when_vap' '0'
-
-config 'defaults' 'interface'
- option 'netmask' '255.255.255.255'
-
-
-config 'defaults' 'bssidscheme'
- option '1' '02:CA:FF:EE:BA:BE'
- option '40' '02:40:CA:FF:EE:EE'
-
-config 'defaults' 'wifi_device'
- option 'country' 'DE'
-
-config 'defaults' 'wifi_iface'
- option 'mcast_rate' '6000'
diff --git a/contrib/package/community-profiles/files/etc/config/profile_leipzig b/contrib/package/community-profiles/files/etc/config/profile_leipzig
deleted file mode 100644
index 671f3e853..000000000
--- a/contrib/package/community-profiles/files/etc/config/profile_leipzig
+++ /dev/null
@@ -1,55 +0,0 @@
-config 'community' 'profile'
- option 'name' 'Freifunk Leipzig'
- option 'homepage' 'http://leipzig.freifunk.net'
- option 'ssid' 'leipzig.freifunk.net'
- option 'mesh_network' '10.61.0.0/16'
- option 'latitude' '51.33348'
- option 'longitude' '12.40297'
- option 'suffix' 'olsr.leipzig.freifunk.net'
- option 'vap' '1'
- option 'adhoc_dhcp_when_vap' '0'
-
-config 'defaults' 'interface'
- option 'netmask' '255.255.255.255'
-
-config 'defaults' 'bssidscheme'
- option '1' '02:CA:FF:EE:BA:BE'
- option '40' '02:40:CA:FF:EE:EE'
-
-config 'defaults' 'wifi_device'
- option 'country' 'DE'
-
-config 'defaults' 'wifi_iface'
- option 'mcast_rate' '6000'
-
-config 'defaults' 'olsrd'
- option 'LinkQualityAlgorithm' 'etx_ff'
-
-
-config widget 'customindex'
- option enabled '1'
- option width '50%'
- option paddingright '5%'
- option template 'html'
-
-config widget 'rssffl'
- option enabled '1'
- option max '10'
- option cache '3600'
- option width '100%'
- option title 'Freifunk Leipzig Blog'
- option template 'iframe'
- option url 'http://leipzig.freifunk.net'
-
-config widget 'rssbundesweit'
- option cache '3600'
- option width '50%'
- option title 'bundesweiter Freifunk Blog'
- option template 'rssfeed'
- option enabled '1'
- option max '10'
- option url 'http://blog.freifunk.net/rss.xml'
-
-config widget 'clear1'
- option template 'clear'
- option enabled '1'
diff --git a/contrib/package/community-profiles/files/etc/config/profile_marburg b/contrib/package/community-profiles/files/etc/config/profile_marburg
deleted file mode 100644
index 18cff80e5..000000000
--- a/contrib/package/community-profiles/files/etc/config/profile_marburg
+++ /dev/null
@@ -1,12 +0,0 @@
-config 'community' 'profile'
- option 'name' 'Freifunk Marburg'
- option 'homepage' ' http://marburg.freifunk.de'
- option 'ssid' 'marburg.freifunk.net'
- option 'mesh_network' '10.128.0.0/16'
- option 'splash_network' '10.104.0.0/16'
- option 'splash_prefix' '29'
- option 'latitude' '49.63939'
- option 'longitude' '8.633718'
-
-config 'defaults' 'interface'
- option 'dns' '8.8.8.8 212.204.49.83'
diff --git a/contrib/package/community-profiles/files/etc/config/profile_oldenburg b/contrib/package/community-profiles/files/etc/config/profile_oldenburg
deleted file mode 100644
index e967fdb43..000000000
--- a/contrib/package/community-profiles/files/etc/config/profile_oldenburg
+++ /dev/null
@@ -1,15 +0,0 @@
-config 'community' 'profile'
- option 'name' 'Freifunk Oldenburg'
- option 'homepage' 'http://oldenburg.freifunk.net'
- option 'ssid' 'oldenburg.freifunk.net'
- option 'mesh_network' '10.18.0.0/16'
- option 'splash_network' '10.104.0.0/16'
- option 'splash_prefix' '27'
- option 'latitude' '53.14083'
- option 'longitude' '8.21314'
-
-config 'defaults' 'wifi_device'
- option 'channel' '6'
-
-config 'defaults' 'wifi_iface'
- option 'bssid' '02:CA:FF:EE:BA:BE'
diff --git a/contrib/package/community-profiles/files/etc/config/profile_openwireless_bern b/contrib/package/community-profiles/files/etc/config/profile_openwireless_bern
deleted file mode 100644
index 810ad8f1c..000000000
--- a/contrib/package/community-profiles/files/etc/config/profile_openwireless_bern
+++ /dev/null
@@ -1,18 +0,0 @@
-config 'community' 'profile'
- option 'name' 'Openwireless Bern'
- option 'homepage' 'http://bern.openwireless.ch/'
- option 'ssid' 'www.openwireless.ch'
- option 'mesh_network' '10.247.0.0/16'
- option 'splash_network' '10.104.0.0/16'
- option 'splash_prefix' '27'
- option 'latitude' '50.814788'
- option 'longitude' '8.769239'
-
-config 'defaults' 'interface'
- option 'dns' '208.67.222.222 208.67.220.220'
-
-config 'defaults' 'wifi_device'
- option 'channel' '10'
- option 'country' '756'
-
-
diff --git a/contrib/package/community-profiles/files/etc/config/profile_piraten_dresden b/contrib/package/community-profiles/files/etc/config/profile_piraten_dresden
deleted file mode 100644
index 2af0e319d..000000000
--- a/contrib/package/community-profiles/files/etc/config/profile_piraten_dresden
+++ /dev/null
@@ -1,12 +0,0 @@
-config 'community' 'profile'
- option 'name' 'Piratenfreifunk Dresden'
- option 'homepage' 'http://www.piraten-sachsen.de/'
- option 'ssid' 'dresden.freifunk.net'
- option 'mesh_network' '10.12.0.0/16'
- option 'splash_network' '10.104.0.0/16'
- option 'splash_prefix' '27'
- option 'latitude' '51.05081'
- option 'longitude' '13.73420'
-
-config 'defaults' 'wifi_device'
- option 'channel' '1'
diff --git a/contrib/package/community-profiles/files/etc/config/profile_potsdam b/contrib/package/community-profiles/files/etc/config/profile_potsdam
deleted file mode 100644
index 78db579a9..000000000
--- a/contrib/package/community-profiles/files/etc/config/profile_potsdam
+++ /dev/null
@@ -1,35 +0,0 @@
-config 'community' 'profile'
- option 'name' 'Freifunk Potsdam'
- option 'homepage' 'http://potsdam.freifunk.net'
- option 'ssid' 'freifunk-potsdam.de'
- option 'mesh_network' '10.22.0.0/16'
- option 'splash_network' '192.168.22.0/24'
- option 'splash_prefix' '24'
- option 'latitude' '52.39349'
- option 'longitude' '13.06489'
- option 'ipv6' '0'
-
-config 'defaults' 'interface'
- option 'netmask' '255.255.0.0'
- option 'dns' '85.214.20.141 80.67.169.40 194.150.168.168'
- option 'delegate' '0'
-
-config 'defaults' 'wifi_device'
- option 'channel' '5'
-
-config 'defaults' 'wifi_device_5'
- option 'channel' '44'
-
-config 'defaults' 'bssidscheme'
- option '5' '02:CA:FF:EE:BA:BE'
- option '44' '02:CA:FF:EE:BA:BE'
-
-config 'defaults' 'ssidscheme'
- option '5' 'Mesh23'
- option '44' 'Mesh23'
-
-config 'defaults' 'dhcp'
- option 'leasetime' '15m'
-
-config 'defaults' 'olsrd'
- option 'LinkQualityAlgorithm' 'etx_ffeth'
diff --git a/contrib/package/community-profiles/files/etc/config/profile_reihen b/contrib/package/community-profiles/files/etc/config/profile_reihen
deleted file mode 100644
index a05d6a296..000000000
--- a/contrib/package/community-profiles/files/etc/config/profile_reihen
+++ /dev/null
@@ -1,25 +0,0 @@
-config 'community' 'profile'
- option 'name' 'Freifunk Reihen'
- option 'homepage' 'http://freifunk.reihen.de'
- option 'ssid' 'freifunk.reihen.de'
- option 'mesh_network' '172.23.0.0/16'
- option 'splash_network' '172.23.26.0/29'
- option 'latitude' '49.21'
- option 'longitude' '8.91'
- option 'splash_prefix' '29'
-
-config 'defaults' 'interface'
- option 'netmask' '255.255.0.0'
- option 'dns' '172.23.25.204 172.23.31.237 141.1.1.1'
-
-config 'defaults' 'wifi_device'
- option 'channel' '13'
- option 'bssid' '02:07:04:08:08:09'
-
-config 'defaults' 'bssidscheme'
- option '13' '02:07:04:08:08:09'
- option '36' '02:36:CA:FF:EE:EE'
-
-config 'defaults' 'ssidscheme'
- option '13' 'ch13.freifunk.net'
- option '36' 'ch36.freifunk.net'
diff --git a/contrib/package/community-profiles/files/etc/config/profile_rosbach b/contrib/package/community-profiles/files/etc/config/profile_rosbach
deleted file mode 100644
index 4444f7099..000000000
--- a/contrib/package/community-profiles/files/etc/config/profile_rosbach
+++ /dev/null
@@ -1,15 +0,0 @@
-config 'community' 'profile'
- option 'name' 'Freifunk Rosbach'
- option 'homepage' 'freifunk-rosbach.de'
- option 'ssid' 'rosbach.freifunk.net'
- option 'mesh_network' '10.212.0.0/16'
- option 'splash_network' '10.104.0.0/16'
- option 'splash_prefix' '27'
- option 'latitude' '50.18'
- option 'longitude' '8.42'
-
-config 'defaults' 'wifi_device'
- option 'channel' '13'
-
-config 'defaults' 'wifi_iface'
- option 'bssid' 'D2:CA:FF:EE:BA:BE'
diff --git a/contrib/package/community-profiles/files/etc/config/profile_schwarzach b/contrib/package/community-profiles/files/etc/config/profile_schwarzach
deleted file mode 100644
index c973ca0a7..000000000
--- a/contrib/package/community-profiles/files/etc/config/profile_schwarzach
+++ /dev/null
@@ -1,12 +0,0 @@
-config 'community' 'profile'
- option 'name' 'Freifunk Schwarzach'
- option 'homepage' 'http://schwarzach.freifunk.net'
- option 'ssid' 'schwarzach.freifunk.net'
- option 'mesh_network' '10.81.0.0/20'
- option 'splash_network' '10.104.0.0/16'
- option 'latitude' '49.373'
- option 'longitude' '8.983'
- option 'splash_prefix' '27'
-
-config 'defaults' 'interface'
- option 'netmask' '255.255.240.0'
diff --git a/contrib/package/community-profiles/files/etc/config/profile_stuttgart b/contrib/package/community-profiles/files/etc/config/profile_stuttgart
deleted file mode 100644
index 28d60d8df..000000000
--- a/contrib/package/community-profiles/files/etc/config/profile_stuttgart
+++ /dev/null
@@ -1,13 +0,0 @@
-config 'community' 'profile'
- option 'name' 'Freifunk Stuttgart'
- option 'homepage' 'http://freifunk-stuttgart.de'
- option 'ssid' 'Freifunk Stuttgart'
- option 'mesh_network' '172.21.0.0/16'
- option 'splash_network' '10.104.0.0/16'
- option 'latitude' '48'
- option 'longitude' '9'
- option 'splash_prefix' '27'
-
-config 'defaults' 'wifi_device'
- option 'channel' '5'
- option 'bssid' '52:CA:FF:EE:BA:BE'
diff --git a/contrib/package/community-profiles/files/etc/config/profile_tulumlibre b/contrib/package/community-profiles/files/etc/config/profile_tulumlibre
deleted file mode 100644
index ceaff2a74..000000000
--- a/contrib/package/community-profiles/files/etc/config/profile_tulumlibre
+++ /dev/null
@@ -1,10 +0,0 @@
-config 'community' 'profile'
- option 'name' 'tulumlibre'
- option 'ssid' 'tulumlibre'
- option 'mesh_network' '10.39.128.0/18'
- option 'latitude' '20.2106708'
- option 'longitude' '-87.4629471'
- option 'splash_prefix' '28'
-
-config 'defaults' 'interface'
- option 'dns' '80.67.169.40 216.87.84.211'
diff --git a/contrib/package/community-profiles/files/etc/config/profile_vogtland b/contrib/package/community-profiles/files/etc/config/profile_vogtland
deleted file mode 100644
index 8baeec6d1..000000000
--- a/contrib/package/community-profiles/files/etc/config/profile_vogtland
+++ /dev/null
@@ -1,23 +0,0 @@
-config 'community' 'profile'
- option 'name' 'Freifunk Vogtland'
- option 'homepage' 'http://wiki.freifunk.net/Freifunk_Vogtland'
- option 'ssid' 'vogtland.freifunk.net'
- option 'mesh_network' '10.204.0.0/16'
- option 'splash_network' '6.204.0.0/16'
- option 'splash_prefix' '27'
- option 'latitude' '53.11'
- option 'longitude' '12.61'
-
-config 'defaults' 'interface'
- option 'netmask' '255.255.255.255'
-
-
-config 'defaults' 'bssidscheme'
- option '1' '02:CA:FF:EE:BA:BE'
- option '40' '02:40:CA:FF:EE:EE'
-
-config 'defaults' 'wifi_device'
- option 'country' 'DE'
-
-config 'defaults' 'wifi_iface'
- option 'mcast_rate' '6000'
diff --git a/contrib/package/community-profiles/files/etc/config/profile_weil b/contrib/package/community-profiles/files/etc/config/profile_weil
deleted file mode 100644
index ddba1f358..000000000
--- a/contrib/package/community-profiles/files/etc/config/profile_weil
+++ /dev/null
@@ -1,23 +0,0 @@
-config 'community' 'profile'
- option 'name' 'Freifunk Weil am Rhein'
- option 'homepage' 'http://weil-am-rhein.freifunk.net'
- option 'ssid' 'mesh.freifunk.net'
- option 'mesh_network' '10.119.0.0/18'
- option 'latitude' '47.6056'
- option 'longitude' '7.6083'
- option 'suffix' 'ffwr'
- option 'vap' '1'
- option 'adhoc_dhcp_when_vap' '0'
- list 'owm_api' 'http://api.openwifimap.net'
- list 'owm_api' 'http://owmapi.pberg.freifunk.net'
- option 'mapserver' 'http://openwifimap.net/'
-
-config 'defaults' 'interface'
- option 'netmask' '255.255.192.0'
-
-config 'defaults' 'wifi_device'
- option 'country' 'DE'
- option 'channel' '10'
-
-config 'defaults' 'luci_splash'
- option 'leasetime' '24'
diff --git a/contrib/package/community-profiles/files/etc/config/profile_weimar b/contrib/package/community-profiles/files/etc/config/profile_weimar
deleted file mode 100644
index 65938e744..000000000
--- a/contrib/package/community-profiles/files/etc/config/profile_weimar
+++ /dev/null
@@ -1,10 +0,0 @@
-config 'community' 'profile'
- option 'name' 'Weimarnetz e.V.'
- option 'homepage' 'http://www.weimarnetz.de'
- option 'ssid' 'weimarnetz'
- option 'mesh_network' '10.63.0.0/16'
- option 'latitude' '50.989530'
- option 'longitude' '11.338675'
-
-config 'defaults' 'interface'
- option 'dns' '217.11.48.200 217.11.49.200 8.8.8.8'
diff --git a/contrib/package/community-profiles/files/etc/config/profile_weinstadt b/contrib/package/community-profiles/files/etc/config/profile_weinstadt
deleted file mode 100644
index 49a42fa63..000000000
--- a/contrib/package/community-profiles/files/etc/config/profile_weinstadt
+++ /dev/null
@@ -1,19 +0,0 @@
-config 'community' 'profile'
- option 'name' 'Freifunk Weinstadt'
- option 'homepage' 'http://freifunk-weinstadt.de'
- option 'ssid' 'freifunk-weinstadt'
- option 'mesh_network' '172.21.0.0/16'
- option 'splash_network' '172.21.85.0/30'
- option 'latitude' '48.81'
- option 'longitude' '9.39'
- option 'splash_prefix' '30'
-
-config 'defaults' 'wifi_device'
- option 'channel' '13'
- option 'bssid' '02:07:01:03:08:04'
-
-config 'defaults' 'bssidscheme'
- option '13' '02:07:01:03:08:04'
-
-config 'defaults' 'interface'
- option 'dns' '172.21.77.4 172.21.84.235 141.1.1.1'
diff --git a/contrib/package/community-profiles/files/etc/config/profile_wlanljubljana b/contrib/package/community-profiles/files/etc/config/profile_wlanljubljana
deleted file mode 100644
index eeefbd22b..000000000
--- a/contrib/package/community-profiles/files/etc/config/profile_wlanljubljana
+++ /dev/null
@@ -1,15 +0,0 @@
-config 'community' 'profile'
- option 'name' 'wlan ljubljana'
- option 'homepage' 'http://wlan-lj.net'
- option 'ssid' 'open.wlan-lj.net'
- option 'mesh_network' '10.254.0.0/16'
- option 'splash_network' '10.254.120.0/21'
- option 'splash_prefix' '27'
- option 'latitude' '46.05063'
- option 'longitude' '14.50402'
-
-config 'defaults' 'wifi_device'
- option 'channel' '8'
-
-config 'defaults' 'interface'
- option 'dns' '10.254.0.1 10.254.0.2'
diff --git a/contrib/package/freifunk-common/Makefile b/contrib/package/freifunk-common/Makefile
deleted file mode 100644
index f7128b641..000000000
--- a/contrib/package/freifunk-common/Makefile
+++ /dev/null
@@ -1,43 +0,0 @@
-# Copyright (C) 2011 Manuel Munz <freifunk at somakoma de>
-# This is free software, licensed under the Apache 2.0 license.
-
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=freifunk-common
-PKG_RELEASE:=3
-
-PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
-
-include $(INCLUDE_DIR)/package.mk
-
-define Package/freifunk-common
- SECTION:=luci
- CATEGORY:=LuCI
- SUBMENU:=9. Freifunk
- TITLE:=Freifunk common files
- DEPENDS:=+libuci-lua
-endef
-
-define Package/freifunk-common/description
- Common files and scripts that are needed to run free wireless mesh networks.
-endef
-
-define Package/luci-mod-freifunk/conffiles
-/etc/config/freifunk
-endef
-
-define Build/Prepare
- mkdir -p $(PKG_BUILD_DIR)
-endef
-
-define Build/Configure
-endef
-
-define Build/Compile
-endef
-
-define Package/freifunk-common/install
- $(CP) ./files/* $(1)/
-endef
-
-$(eval $(call BuildPackage,freifunk-common))
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 b1a2e41e2..000000000
--- 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 dbe648ae5..000000000
--- 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 11f1ad60b..000000000
--- 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 fe6586c22..000000000
--- 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 24e8c2e18..000000000
--- 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 82589ecfd..000000000
--- 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 728526b9e..000000000
--- 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 af1d7ca68..000000000
--- 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
diff --git a/contrib/package/freifunk-firewall/Makefile b/contrib/package/freifunk-firewall/Makefile
deleted file mode 100644
index b9d328c66..000000000
--- a/contrib/package/freifunk-firewall/Makefile
+++ /dev/null
@@ -1,53 +0,0 @@
-#
-# Copyright (C) 2009 Jo-Philipp Wich <jow@openwrt.org>
-#
-# This is free software, licensed under the Apache 2.0 license.
-#
-
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=freifunk-firewall
-PKG_RELEASE:=3
-
-PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
-
-include $(INCLUDE_DIR)/package.mk
-
-define Package/freifunk-firewall
- SECTION:=luci
- CATEGORY:=LuCI
- SUBMENU:=9. Freifunk
- TITLE:=Freifunk Firewall Addon
- DEPENDS:=+firewall
-endef
-
-define Package/freifunk-firewall/description
- Various firewall extensions for Freifunk. Includes NAT fixes and advanced settings.
-endef
-
-define Build/Prepare
- mkdir -p $(PKG_BUILD_DIR)
-endef
-
-define Build/Configure
-endef
-
-define Build/Compile
-endef
-
-define Package/freifunk-firewall/postinst
-#!/bin/sh
-[ -n "$${IPKG_INSTROOT}" ] || {
- if ! grep -q /etc/firewall.freifunk /etc/config/firewall; then
- uci add firewall include >/dev/null
- uci set firewall.@include[-1].path=/etc/firewall.freifunk
- uci commit firewall
- fi
-}
-endef
-
-define Package/freifunk-firewall/install
- $(CP) ./files/* $(1)/
-endef
-
-$(eval $(call BuildPackage,freifunk-firewall))
diff --git a/contrib/package/freifunk-firewall/files/etc/firewall.freifunk b/contrib/package/freifunk-firewall/files/etc/firewall.freifunk
deleted file mode 100644
index d2805f668..000000000
--- a/contrib/package/freifunk-firewall/files/etc/firewall.freifunk
+++ /dev/null
@@ -1,40 +0,0 @@
-#!/bin/sh
-# Freifunk Firewall addons
-
-. /lib/functions.sh
-
-#
-# Apply advanced settings
-#
-apply_advanced() {
- local tcp_ecn
- local tcp_window_scaling
- local accept_redirects
- local accept_source_route
-
- config_get_bool tcp_ecn $1 tcp_ecn 1
- config_get_bool tcp_window_scaling $1 tcp_window_scaling 1
- config_get_bool accept_redirects $1 accept_redirects 0
- config_get_bool accept_source_route $1 accept_source_route 0
-
- logger -t firewall.freifunk "tcp_ecn is $tcp_ecn"
- logger -t firewall.freifunk "tcp_window_scaling is $tcp_window_scaling"
- logger -t firewall.freifunk "accept_redirects is $accept_redirects"
- logger -t firewall.freifunk "accept_source_route is $accept_source_route"
-
- sysctl -w net.ipv4.tcp_ecn=$tcp_ecn >/dev/null
- sysctl -w net.ipv4.tcp_window_scaling=$tcp_window_scaling >/dev/null
-
- for f in /proc/sys/net/ipv4/conf/*/accept_redirects; do
- echo $accept_redirects > $f
- done
-
- for f in /proc/sys/net/ipv4/conf/*/accept_source_route; do
- echo $accept_source_route > $f
- done
-}
-
-config_foreach apply_advanced advanced
-
-[ -x /etc/init.d/freifunk-p2pblock ] && /etc/init.d/freifunk-p2pblock enabled && \
- ( sleep 3; /etc/init.d/freifunk-p2pblock restart )&
diff --git a/contrib/package/freifunk-firewall/files/etc/hotplug.d/firewall/23-restricted-wan b/contrib/package/freifunk-firewall/files/etc/hotplug.d/firewall/23-restricted-wan
deleted file mode 100644
index e71c852df..000000000
--- a/contrib/package/freifunk-firewall/files/etc/hotplug.d/firewall/23-restricted-wan
+++ /dev/null
@@ -1,65 +0,0 @@
-#!/bin/sh
-
-clear_restricted_gw()
-{
- local state="$1"
- local iface
- local ifname
- local subnet
-
- config_get iface "$state" iface
-
- if [ "$iface" = "$INTERFACE" ]; then
- config_get ifname "$state" ifname
- config_get subnet "$state" subnet
-
- logger -t firewall.freifunk "removing local restriction to the network connected to $ifname ($iface)"
- iptables -D forwarding_freifunk_rule -o $ifname -d $subnet -j REJECT --reject-with icmp-host-prohibited
- uci_revert_state firewall "$state"
- fi
-}
-
-get_enabled()
-{
- local name
- config_get name "$1" name
-
- if [ "$name" = "$ZONE" ]; then
- config_get_bool local_restrict "$1" local_restrict
- fi
-}
-
-if [ "$ACTION" = add ]; then
- local enabled
- local subnet
-
- . /lib/functions/network.sh
-
- network_find_wan wan
-
- [ "$INTERFACE" = "$wan" ] || return 0
-
- network_get_subnet subnet $INTERFACE
-
- if [ -n "$subnet" ]; then
- config_load firewall
-
- local_restrict=0
- config_foreach get_enabled zone
-
- if [ "$local_restrict" = 1 ]; then
- logger -t firewall.freifunk "restricting local access to the network connected to $INTERFACE ($DEVICE)"
- iptables -I forwarding_freifunk_rule -o $DEVICE -d $subnet -j REJECT --reject-with icmp-host-prohibited
- local state="restricted_gw_${INTERFACE}"
- uci_set_state firewall "$state" "" restricted_gw_state
- uci_set_state firewall "$state" iface "$INTERFACE"
- uci_set_state firewall "$state" ifname "$DEVICE"
- uci_set_state firewall "$state" subnet "$subnet"
- fi
- fi
-
-elif [ "$ACTION" = remove ]; then
- config_load firewall
- config_foreach clear_restricted_gw restricted_gw_state
-fi
-
diff --git a/contrib/package/freifunk-gwcheck/Makefile b/contrib/package/freifunk-gwcheck/Makefile
deleted file mode 100644
index 6c2affe74..000000000
--- a/contrib/package/freifunk-gwcheck/Makefile
+++ /dev/null
@@ -1,40 +0,0 @@
-# Copyright (C) 2011 Manuel Munz <freifunk at somakoma de>
-# This is free software, licensed under the Apache 2.0 license.
-
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=freifunk-gwcheck
-PKG_RELEASE:=4
-
-PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
-
-include $(INCLUDE_DIR)/package.mk
-
-define Package/freifunk-gwcheck
- SECTION:=luci
- CATEGORY:=LuCI
- SUBMENU:=9. Freifunk
- TITLE:=Freifunk gateway check script
- DEPENDS:=firewall +ip +iptables-mod-ipopt +olsrd-mod-dyn-gw-plain
-endef
-
-define Package/freifunk-gwcheck/description
- This script periodically checks if internet is available via your own gateway. If it detects that it is broken, then the defaultroute is removed from the main table and temporarilly placed in table gw-check until your internet works again. Config file is /etc/config/freifunk-gwcheck.
-endef
-
-define Build/Prepare
- mkdir -p $(PKG_BUILD_DIR)
-endef
-
-define Build/Configure
-endef
-
-define Build/Compile
-endef
-
-define Package/freifunk-gwcheck/install
- $(CP) ./files/* $(1)/
- $(CP) ./root/* $(1)/
-endef
-
-$(eval $(call BuildPackage,freifunk-gwcheck))
diff --git a/contrib/package/freifunk-gwcheck/files/etc/config/freifunk-gwcheck b/contrib/package/freifunk-gwcheck/files/etc/config/freifunk-gwcheck
deleted file mode 100644
index b174dd627..000000000
--- a/contrib/package/freifunk-gwcheck/files/etc/config/freifunk-gwcheck
+++ /dev/null
@@ -1,5 +0,0 @@
-config 'gwcheck' 'hosts'
- list 'host' 'augsburg.freifunk.net'
- list 'host' 'vpn4.leipzig.freifunk.net'
- list 'host' 'luci.subsignal.org'
- list 'host' 'bbb-vpn.berlin.freifunk.net'
diff --git a/contrib/package/freifunk-gwcheck/files/usr/sbin/ff_olsr_test_gw.sh b/contrib/package/freifunk-gwcheck/files/usr/sbin/ff_olsr_test_gw.sh
deleted file mode 100755
index b86b66873..000000000
--- a/contrib/package/freifunk-gwcheck/files/usr/sbin/ff_olsr_test_gw.sh
+++ /dev/null
@@ -1,132 +0,0 @@
-#!/bin/sh
-# Copyright 2013 Manuel Munz <freifunk at somakoma dot de>
-# Licensed under the GNU General Public License (GPL) v3
-# This script monitors the local internet gateway
-
-. /lib/functions.sh
-. /lib/functions/network.sh
-. /usr/share/libubox/jshn.sh
-
-# exit if dyngw_plain is not enabled or RtTable is not (254 or unset)
-config_load olsrd
-
-check_dyngw_plain()
-{
- local cfg="$1"
- config_get library "$cfg" library
- if [ "${library#olsrd_dyn_gw_plain}" != "$library" ]; then
- config_get ignore "$cfg" ignore
- config_get RtTable "$cfg" RtTable
- if [ "$ignore" != "1" ] && [ -z "$RtTable" -o "$RtTable" = "254" ]; then
- exit=0
- fi
- fi
-}
-
-exit=1
-config_foreach check_dyngw_plain LoadPlugin
-[ "$exit" = "1" ] && exit 1
-
-#Exit if this script is already running
-pid="$(pidof ff_olsr_test_gw.sh)"
-if [ ${#pid} -gt 5 ]; then
- logger -p debug -t gwcheck "Gateway check script is already running, exit now"
- exit 1
-fi
-
-# exit if there is no defaultroute with metric=0 in main or gw-check table.
-defroutemain="$(ip route show |grep default |grep -v metric)"
-defroutegwcheck="$(ip route show table gw-check |grep default |grep -v metric)"
-if [ -z "$defroutegwcheck" -a -z "$defroutemain" ]; then
- exit 1
-fi
-
-# get and shuffle list of testservers
-testserver="$(uci -q get freifunk-gwcheck.hosts.host)"
-[ -z "$testserver" ] && echo "No testservers found, exit" && exit
-
-testserver="$(for t in $testserver; do echo $t; done | awk 'BEGIN {
- srand();
-}
-{
- l[NR] = $0;
-}
-
-END {
- for (i = 1; i <= NR; i++) {
- n = int(rand() * (NR - i + 1)) + i;
- print l[n];
- l[n] = l[i];
- }
-}')"
-
-check_internet() {
- for t in $testserver; do
- local test
- test=$(wget -q http://$t/conntest.html -O -| grep "Internet_works")
- if [ "$test" == "Internet_works" ]; then
- echo 0
- break
- else
- logger -p debug -t gw-check "Could not fetch http://$t/conntest.html"
- fi
- done
-}
-
-resolve() {
- echo "$(nslookup $1 2>/dev/null |grep 'Address' |grep -v '127.0.0.1' |awk '{ print $3 }')"
-}
-
-get_dnsservers() {
- # this gets all dns servers for the interface which has the default route
-
- dns=""
- if [ ! -x /bin/ubus ]; then
- # ubus not present (versions before Attitude): fallback to get these from /var/state/network.
- # We always assume that wan is the default route interface here
- dns="$(grep network.wan.resolv_dns /var/state/network | cut -d "=" -f 2)"
- else
- network_find_wan wan
- network_get_dnsserver dns $wan
- fi
-}
-
-iw=$(check_internet)
-
-if [ "$iw" == 0 ]; then
- # Internet available again, restore default route and remove ip rules
- if [ -n "$defroutegwcheck" ]; then
- ip route add $defroutegwcheck
- ip route del $defroutegwcheck table gw-check
- for host in $testserver; do
- ips="$(resolve $host)"
- for ip in $ips; do
- [ -n "$(ip rule show | grep "to $ip lookup gw-check")" ] && ip rule del to $ip table gw-check
- done
- done
- get_dnsservers
- for d in $dns; do
- [ -n "$(ip rule show | grep "to $d lookup gw-check")" ] && ip rule del to $d table gw-check
- done
- logger -p err -t gw-check "Internet is available again, default route restored ( $defroutegwcheck)"
- fi
-
-else
- # Check failed. Move default route to table gw-check and setup ip rules.
- if [ -z "$(ip rule show | grep gw-check)" -a -n "$defroutemain" ]; then
- ip route add $defroutemain table gw-check
- ip route del $defroutemain
- logger -p err -t gw-check "Internet is not available, default route deactivated ( $defroutemain)"
- fi
- for host in $testserver; do
- ips="$(resolve $host)"
- for ip in $ips; do
- [ -z "$(ip rule show | grep "to $ip lookup gw-check")" ] && ip rule add to $ip table gw-check
- done
- done
- get_dnsservers
- for d in $dns; do
- [ -z "$(ip rule show | grep "to $d lookup gw-check")" ] && ip rule add to $d table gw-check
- done
- logger -p err -t gw-check "Check your internet connection!"
-fi
diff --git a/contrib/package/freifunk-gwcheck/root/etc/uci-defaults/50_freifunk-gwcheck b/contrib/package/freifunk-gwcheck/root/etc/uci-defaults/50_freifunk-gwcheck
deleted file mode 100644
index 33b1b99df..000000000
--- a/contrib/package/freifunk-gwcheck/root/etc/uci-defaults/50_freifunk-gwcheck
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/sh
-tables="/etc/iproute2/rt_tables"
-test -d /etc/iproute2/ || mkdir -p /etc/iproute2/
-grep -q "gw-check" $tables || echo "200 gw-check" >> $tables
-test -f /etc/crontabs/root || touch /etc/crontabs/root
-grep -q "ff_olsr_test_gw.sh" /etc/crontabs/root || echo "* * * * * /usr/sbin/ff_olsr_test_gw.sh" >> /etc/crontabs/root
-/etc/init.d/cron restart
diff --git a/contrib/package/freifunk-mapupdate/Makefile b/contrib/package/freifunk-mapupdate/Makefile
deleted file mode 100644
index a9281ca20..000000000
--- a/contrib/package/freifunk-mapupdate/Makefile
+++ /dev/null
@@ -1,39 +0,0 @@
-# Copyright (C) 2011 Manuel Munz <freifunk at somakoma de>
-# This is free software, licensed under the Apache 2.0 license.
-
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=freifunk-mapupdate
-PKG_RELEASE:=1
-
-PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
-
-include $(INCLUDE_DIR)/package.mk
-
-define Package/freifunk-mapupdate
- SECTION:=luci
- CATEGORY:=LuCI
- SUBMENU:=9. Freifunk
- TITLE:=Update script for freifunkmap
- DEPENDS:=+olsrd-mod-nameservice
-endef
-
-define Package/freifunk-mapupdate/description
- This script updates the freifunkmap (also known as the global map, see http://map.berlin.freifunk.net) every hour. Config file is /etc/config/freifunk-mapupdate.
-endef
-
-define Build/Prepare
- mkdir -p $(PKG_BUILD_DIR)
-endef
-
-define Build/Configure
-endef
-
-define Build/Compile
-endef
-
-define Package/freifunk-mapupdate/install
- $(CP) ./files/* $(1)/
-endef
-
-$(eval $(call BuildPackage,freifunk-mapupdate))
diff --git a/contrib/package/freifunk-mapupdate/files/etc/config/freifunk-mapupdate b/contrib/package/freifunk-mapupdate/files/etc/config/freifunk-mapupdate
deleted file mode 100644
index 7e98f956d..000000000
--- a/contrib/package/freifunk-mapupdate/files/etc/config/freifunk-mapupdate
+++ /dev/null
@@ -1,3 +0,0 @@
-config 'mapupdate' 'mapupdate'
- option 'enabled' '1'
- option 'mapserver' 'http://map.berlin.freifunk.net/freifunkmap.php'
diff --git a/contrib/package/freifunk-mapupdate/files/usr/sbin/ff_mapupdate.sh b/contrib/package/freifunk-mapupdate/files/usr/sbin/ff_mapupdate.sh
deleted file mode 100755
index b06e145d6..000000000
--- a/contrib/package/freifunk-mapupdate/files/usr/sbin/ff_mapupdate.sh
+++ /dev/null
@@ -1,59 +0,0 @@
-#!/bin/sh
-
-if [ ! "$(uci -q get freifunk-mapupdate.mapupdate.enabled)" == 1 ]; then
- exit 1
-fi
-
-MAPSERVER="$(uci -q get freifunk-mapupdate.mapupdate.mapserver)"
-[ -z "$MAPSERVER" ] && logger -t "freifunk-mapupdate:" "No mapserver configured" && exit 1
-
-#check if nameservice plugin is installed and enabled, else exit
-nslib=`uci show olsrd |grep olsrd_nameservice |awk {' FS="."; print $1"."$2 '}`
-if [ -n "$nslib" ]; then
- LATLONFILE="$(uci -q get $nslib.latlon_file)"
- if [ -z "$LATLONFILE" ]; then
- LATLONFILE="/var/run/latlon.js"
- fi
- if [ ! -p "$LATLONFILE" ]; then
- logger -t "freifunk-mapupdate:" "latlon_file not found."; exit 1
- fi
-else
- logger -t "freifunk-mapupdate:" "nameservice plugin not found in olsrd config."
- exit 1
-fi
-
-HOSTNAME="$(uci show system |grep hostname |cut -d "=" -f 2)"
-HF_INFO=""
-
-# Get info for myself
-SELF=$(cat $LATLONFILE |grep ^Self | sed -e 's/Self(//' -e 's/);//' -e "s/'//g")
-OLSR_IP="$(echo $SELF |awk '{ FS=",";print $1 }')"
-LOCATION="$(uci show system |grep .location |cut -d "=" -f 2)"
-[ -n "$LOCATION" ] && NOTE="$LOCATION<br>"
-FFNOTE="$(uci -q get freifunk.contact.note)"
-[ -n "$FFNOTE" ] && NOTE="$NOTE $FFNOTE"
-NOTE="<h3><a href='http://$OLSR_IP' target='_blank'>$HOSTNAME</a></h3><p>$NOTE"
-NOTE=`echo -e "$NOTE" | sed -e 's/\ /%20/g' -e 's/&/%26/g' -e 's/"/%22/g'`
-
-UPDATESTRING="$(echo $SELF |awk '{ FS=",";print $2 }'), $(echo $SELF |awk '{ FS=",";print $3 }')"
-
-# write our coordinates to mygooglemapscoords.txt to make Freifunk Firmware happy
-echo "$UPDATESTRING" > /tmp/mygooglemapscoords.txt
-[ ! -L /www/mygooglemapscoords.txt ] && ln -s /tmp/mygooglemapscoords.txt /www/mygooglemapscoords.txt
-
-# get neighbor Info (lat, lon, lq)
-while read line; do
- NEIGHUPD="$(echo $line |awk '{ FS=","; print $6 }'), $(echo $line |awk '{ FS=","; print $7 }'), $(echo $line |awk '{ FS=",";print $4 }')"
- UPDATESTRING="${UPDATESTRING}, ${NEIGHUPD}"
-done << EOF
-`grep "PLink('$OLSR_IP" $LATLONFILE | sed -e 's/PLink(//' -e 's/);//' -e "s/'//g"`
-EOF
-
-# Send UPDATESTRING
-UPDATE=`echo -e "$UPDATESTRING" | sed s/\ /%20/g`
-result="$(wget "$MAPSERVER?update=$UPDATE&updateiv=3600&olsrip=$OLSR_IP&note=${NOTE}${HF_INFO}" -qO -)"
-
-if [ ! "$result" == "success update" ]; then
- logger -t "freifunk-mapupdate:" "Update failed: $result"
-fi
-
diff --git a/contrib/package/freifunk-mapupdate/root/etc/uci-defaults/50_freifunk-mapupdate b/contrib/package/freifunk-mapupdate/root/etc/uci-defaults/50_freifunk-mapupdate
deleted file mode 100644
index dee7f1bb5..000000000
--- a/contrib/package/freifunk-mapupdate/root/etc/uci-defaults/50_freifunk-mapupdate
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-test -f /etc/crontabs/root || touch /etc/crontabs/root
-SEED="$( dd if=/dev/urandom bs=2 count=1 2>&- | hexdump | if read line; then echo 0x${line#* }; fi )"
-MIN="$(( $SEED % 59 ))"
-grep -q "ff_mapupdate.sh" /etc/crontabs/root || echo "$MIN * * * * /usr/sbin/ff_mapupdate.sh" >> /etc/crontabs/root
-/etc/init.d/cron restart
diff --git a/contrib/package/freifunk-policyrouting/Makefile b/contrib/package/freifunk-policyrouting/Makefile
deleted file mode 100644
index a9301cef3..000000000
--- a/contrib/package/freifunk-policyrouting/Makefile
+++ /dev/null
@@ -1,47 +0,0 @@
-# Copyright (C) 2011 Manuel Munz <freifunk at somakoma de>
-# This is free software, licensed under the Apache 2.0 license.
-
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=freifunk-policyrouting
-PKG_RELEASE:=6
-
-PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
-
-include $(INCLUDE_DIR)/package.mk
-
-define Package/freifunk-policyrouting
- SECTION:=luci
- CATEGORY:=LuCI
- SUBMENU:=9. Freifunk
- TITLE:=Freifunk policy routing addon
- DEPENDS:=+ip
-endef
-
-define Package/freifunk-policyrouting/description
- Allows you to send your own traffic via your own default gateway while sending traffic received from the mesh to a gateway in the mesh.
-endef
-
-define Build/Prepare
- mkdir -p $(PKG_BUILD_DIR)
-endef
-
-define Build/Configure
-endef
-
-define Build/Compile
-endef
-
-define Package/freifunk-policyrouting/install
- $(CP) ./files/* $(1)/
-endef
-
-define Package/freifunk-policyrouting/postinst
-#!/bin/sh
-[ -n "$${IPKG_INSTROOT}" ] || {
- /etc/init.d/freifunk-policyrouting enabled || /etc/init.d/freifunk-policyrouting enable
- exit 0
-}
-endef
-
-$(eval $(call BuildPackage,freifunk-policyrouting))
diff --git a/contrib/package/freifunk-policyrouting/files/etc/config/freifunk-policyrouting b/contrib/package/freifunk-policyrouting/files/etc/config/freifunk-policyrouting
deleted file mode 100644
index 3dd2998f9..000000000
--- a/contrib/package/freifunk-policyrouting/files/etc/config/freifunk-policyrouting
+++ /dev/null
@@ -1,7 +0,0 @@
-
-config 'settings' 'pr'
- option 'enable' '0'
- option 'strict' '1'
- option 'fallback' '1'
- option 'zones' ''
-
diff --git a/contrib/package/freifunk-policyrouting/files/etc/hotplug.d/iface/30-policyrouting b/contrib/package/freifunk-policyrouting/files/etc/hotplug.d/iface/30-policyrouting
deleted file mode 100644
index 327e8793b..000000000
--- a/contrib/package/freifunk-policyrouting/files/etc/hotplug.d/iface/30-policyrouting
+++ /dev/null
@@ -1,104 +0,0 @@
-#!/bin/sh
-
-. /lib/functions.sh
-. /lib/functions/network.sh
-
-proto="4"
-[ -f /proc/net/ipv6_route ] && proto="4 6"
-
-config_load freifunk-policyrouting
-config_get enable pr enable
-config_get fallback pr fallback
-config_get strict pr strict
-config_get zones pr zones
-
-if [ "$ACTION" = "ifup" ] && [ "$enable" = "1" ]; then
- network_get_subnet net $INTERFACE
- network_get_subnet6 net6 $INTERFACE
- network_get_physdev dev $INTERFACE
-
- if [ "$net" != "" -a -n "$dev" ]; then
- eval $(/bin/ipcalc.sh $net)
- if [ "$PREFIX" != "0" -a "$NETWORK" != "127.0.0.0" ]; then
- if [ ! "$(ip r s t localnets |grep "$NETWORK/$PREFIX dev")" ]; then
- cmd="ip r a $NETWORK/$PREFIX dev $dev table localnets"
- $cmd
- if [ "$?" = 0 ]; then
- logger -s -t policyrouting "Add route: $cmd"
- else
- logger -s -t policyrouting "Error! Could not add route: $cmd"
- fi
- fi
-
- fi
-
- if [ -n "$net6" ]; then
- cmd="ip -6 r a $net6 dev $dev table localnets"
- $cmd 2>&1 > /dev/null
- if [ "$?" = 0 ]; then
- logger -s -t policyrouting "Add route: $cmd (IPv6)"
- fi
-
- fi
-
- networks=""
- for z in $zones; do
- network_zone="$(uci -q get firewall.zone_${z}.network)"
- if [ -z "$network_zone" ]; then
- network_zone="$z"
- fi
- networks="$networks $network_zone"
- done
- for n in $networks; do
- if [ "$INTERFACE" = "$n" ]; then
- for p in $proto; do
- if [ ! "$(ip -$p ru s | grep "from all iif $dev lookup olsr-default")" ]; then
- ip -$p rule add dev "$dev" lookup olsr-default prio 20000
- if [ "$strict" != 0 ]; then
- ip -$p rule add dev "$dev" unreachable prio 20001
- fi
- if [ "$?" = 0 ]; then
- logger -s -t policyrouting "Use mesh gateway for interface $dev (IPv$p)"
- if [ -z "$(uci -P /var/state get freifunk-policyrouting.${INTERFACE})" ]; then
- uci -P /var/state set freifunk-policyrouting.${INTERFACE}="state"
- fi
- uci -P /var/state set freifunk-policyrouting.${INTERFACE}.device="$dev"
- else
- logger -s -t policyrouting "Error: Could not add rule: dev "$dev" lookup olsr-default prio 20000 (IPv$p)"
- fi
- fi
- done
- fi
- done
- fi
-
-fi
-
-if [ "$ACTION" = "ifdown" ]; then
- dev="$(uci -q -P /var/state get freifunk-policyrouting.${INTERFACE}.device)"
- if [ -n "$dev" ]; then
- networks=""
- for z in $zones; do
- network_zone="$(uci -q get firewall.zone_${z}.network)"
- if [ -z "$network_zone" ]; then
- network_zone="$z"
- fi
- networks="$networks $network_zone"
- done
- for n in $networks; do
- if [ "$INTERFACE" = "$n" ]; then
- for p in $proto; do
- if [ "$(ip -$p ru s | grep "from all iif $dev lookup olsr-default")" ]; then
- ip -$p rule del dev "$dev" lookup olsr-default prio 20000
- ip -$p rule del dev "$dev" unreachable prio 20001
- if [ "$?" = 0 ]; then
- logger -s -t policyrouting "Remove rule: dev "$dev" lookup olsr-default prio 20000 (IPv$p)"
- else
- logger -s -t policyrouting "Error! Could not remove rule: dev "$dev" lookup olsr-default prio 20000 (IPv$p)"
- fi
- fi
- done
- fi
- done
- fi
-fi
diff --git a/contrib/package/freifunk-policyrouting/files/etc/init.d/freifunk-policyrouting b/contrib/package/freifunk-policyrouting/files/etc/init.d/freifunk-policyrouting
deleted file mode 100755
index 4c9172427..000000000
--- a/contrib/package/freifunk-policyrouting/files/etc/init.d/freifunk-policyrouting
+++ /dev/null
@@ -1,172 +0,0 @@
-#!/bin/sh /etc/rc.common
-
-START=15
-. /lib/functions/network.sh
-. /lib/functions.sh
-
-proto="4"
-[ -f /proc/net/ipv6_route ] && proto="4 6"
-[ -f /etc/config/olsrd ] && cfgs="olsrd"
-[ -f /etc/config/olsrd6 ] && cfgs="$cfgs olsrd6"
-
-config_load freifunk-policyrouting
-config_get enable pr enable
-config_get fallback pr fallback
-config_get zones pr zones
-
-
-olsrd_rmtables() {
- for cfg in $cfgs; do
- # Remove custom routing tables from olsrd
- if [ "`uci -q get $cfg.@olsrd[0].RtTable`" == "111" ] || [ "`uci -q get $cfg.@olsrd[0].RtTableDefault`" == "112" ]; then
- uci delete $cfg.@olsrd[0].RtTable
- uci delete $cfg.@olsrd[0].RtTableDefault
- uci commit
- fi
- done
-}
-
-olsrd_intalltables() {
- for cfg in $cfgs; do
- if [ ! "`uci -q get $cfg.@olsrd[0].RtTable`" == "111" ] || [ ! "`uci -q get $cfg.@olsrd[0].RtTableDefault`" == "112" ]; then
- uci set $cfg.@olsrd[0].RtTable='111'
- uci set $cfg.@olsrd[0].RtTableDefault='112'
- uci commit $cfg
- /etc/init.d/$cfg restart 2&> /dev/null
- fi
- done
-}
-
-rt_tables() {
- tables="/etc/iproute2/rt_tables"
- if [ -z "`grep "110" $tables`" ]; then
- echo "110 localnets" >> $tables
- fi
- if [ -z "`grep "111" $tables`" ]; then
- echo "111 olsr" >> $tables
- fi
- if [ -z "`grep "112" $tables`" ]; then
- echo "112 olsr-default" >> $tables
- fi
-
-}
-
-handle_disable_dyngw() {
- local cfg="$1"
- local olsrd_cfg="$2"
- config_get library "$cfg" library
- case "$library" in
- olsrd_dyn_gw_plain*)
- config_get RtTable "$cfg" RtTable
- if [ -z "$RtTable" ] || [ "$RtTable" = "254" ]; then
- config_set "$cfg" ignore '1'
- uci set $olsrd_cfg.$cfg.ignore="1"
- uci commit $olsrd_cfg
- logger -s -t policyrouting -p info "dyngw_plain plugin disabled."
- fi
- ;;
- olsrd_dyn_gw.so*)
- logger -s -t policyrouting -p info "$cfg"
- uci set $olsrd_cfg.$cfg.ignore="1"
- uci commit $olsrd_cfg
- logger -s -t policyrouting -p info "dyngw plugin disabled."
- ;;
- esac
-}
-
-disable_dyngw() {
- for olsrd_cfg in $cfgs; do
- config_load $olsrd_cfg
- config_foreach handle_disable_dyngw LoadPlugin $olsrd_cfg
- done
-}
-
-restart_services() {
- logger -s -t policyrouting -p info "Restarting services"
- /etc/init.d/network restart 2&> /dev/null
- for cfg in $cfgs; do
- /etc/init.d/$cfg restart 2&> /dev/null
- done
-}
-
-boot() {
- if [ "$enable" = "1" ]; then
- [ -d /var/state ] || mkdir -p /var/state
- touch /var/state/freifunk-policyrouting
- start noservicerestart
- else
- olsrd_rmtables
- fi
-}
-
-add_lookup_rule() {
- name=${1/-/_}
- lookup=$2
- prio=$3
-
- if [ -z "$name" -o -z "$lookup" -o -z "$prio" ]; then
- logger -s -t policyrouting "Missing parameters for add_rule!"
- else
- for p in $proto; do
- if [ "$p" = "6" ]; then
- rule="rule6"
- else
- rule="rule"
- fi
-
- uci batch <<- EOF
- set network.${name}ipv${p}="$rule"
- set network.${name}ipv${p}.lookup="$lookup"
- set network.${name}ipv${p}.priority="$prio"
- EOF
- done
- fi
-}
-
-del_lookup_rule() {
- name=${1/-/_}
- for p in $proto; do
- uci -q delete network.${name}ipv${p}
- done
-}
-
-start() {
- if [ $enable = "1" ]; then
- logger -s -t policyrouting "Starting policy routing."
- rt_tables
- olsrd_intalltables
- disable_dyngw
-
- add_lookup_rule olsr olsr 1000
- add_lookup_rule localnets localnets 2000
-
- if [ "$fallback" = 1 ]; then
- add_lookup_rule olsr-default olsr-default 100000
- fi
- fi
- uci commit network
- if [ ! "$1" = "noservicerestart" ]; then
- restart_services
- fi
-}
-
-stop() {
- logger -s -t policyrouting "Stopping policy routing"
- olsrd_rmtables
- del_lookup_rule olsr-default
- del_lookup_rule olsr
- del_lookup_rule localnets
- uci commit network
- restart_services
- echo "Hint: To completely disable freifunk-policyrouting set enable=0 in /etc/config/freifunk-policyrouting."
-}
-
-restart() {
- logger -s -t policyrouting "Restarting policy routing"
- olsrd_rmtables
- del_lookup_rule olsr-default
- del_lookup_rule olsr
- del_lookup_rule localnets
- uci commit network
- start
-}
diff --git a/contrib/package/freifunk-policyrouting/files/etc/uci-defaults/freifunk-policyrouting b/contrib/package/freifunk-policyrouting/files/etc/uci-defaults/freifunk-policyrouting
deleted file mode 100644
index a1e631015..000000000
--- a/contrib/package/freifunk-policyrouting/files/etc/uci-defaults/freifunk-policyrouting
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/sh
-uci batch <<-EOF
- add ucitrack freifunk-policyrouting
- add_list ucitrack.@freifunk-policyrouting[-1].exec="/etc/init.d/freifunk-policyrouting restart"
- commit ucitrack
-EOF
-
diff --git a/contrib/package/freifunk-watchdog/Makefile b/contrib/package/freifunk-watchdog/Makefile
deleted file mode 100644
index c720c251d..000000000
--- a/contrib/package/freifunk-watchdog/Makefile
+++ /dev/null
@@ -1,55 +0,0 @@
-#
-# Copyright (C) 2009-2012 Jo-Philipp Wich <jow@openwrt.org>
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=freifunk-watchdog
-PKG_RELEASE:=8
-
-PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
-PKG_BUILD_DEPENDS := uci
-
-include $(INCLUDE_DIR)/package.mk
-
-define Package/freifunk-watchdog
- SECTION:=luci
- CATEGORY:=LuCI
- SUBMENU:=9. Freifunk
- TITLE:=Freifunk Ad-Hoc watchdog daemon
- DEPENDS:=libuci
-endef
-
-define Package/freifunk-watchdog/description
- A watchdog daemon that monitors wireless interfaces to ensure the correct bssid and channel.
- The process will initiate a wireless restart as soon as it detects a bssid or channel mismatch.
-endef
-
-define Build/Prepare
- mkdir -p $(PKG_BUILD_DIR)
- $(CP) ./src/* $(PKG_BUILD_DIR)/
-endef
-
-define Build/Configure
-endef
-
-define Build/Compile
- $(MAKE) -C $(PKG_BUILD_DIR) \
- CC="$(TARGET_CC)" \
- CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include" \
- LDFLAGS="$(TARGET_LDFLAGS)"
-endef
-
-define Package/freifunk-watchdog/install
- $(INSTALL_DIR) $(1)/etc/init.d
- $(INSTALL_BIN) ./files/freifunk-watchdog.init $(1)/etc/init.d/freifunk-watchdog
- $(INSTALL_DIR) $(1)/etc/config
- $(INSTALL_CONF) ./files/freifunk-watchdog.config $(1)/etc/config/freifunk-watchdog
- $(INSTALL_DIR) $(1)/usr/sbin
- $(INSTALL_BIN) $(PKG_BUILD_DIR)/ffwatchd $(1)/usr/sbin/
-endef
-
-$(eval $(call BuildPackage,freifunk-watchdog))
diff --git a/contrib/package/freifunk-watchdog/files/freifunk-watchdog.config b/contrib/package/freifunk-watchdog/files/freifunk-watchdog.config
deleted file mode 100644
index b6e65433d..000000000
--- a/contrib/package/freifunk-watchdog/files/freifunk-watchdog.config
+++ /dev/null
@@ -1,7 +0,0 @@
-config process
- option process 'dropbear'
- option initscript '/etc/init.d/dropbear'
-
-config process
- option process 'crond'
- option initscript '/etc/init.d/cron'
diff --git a/contrib/package/freifunk-watchdog/files/freifunk-watchdog.init b/contrib/package/freifunk-watchdog/files/freifunk-watchdog.init
deleted file mode 100755
index d6ede09b6..000000000
--- a/contrib/package/freifunk-watchdog/files/freifunk-watchdog.init
+++ /dev/null
@@ -1,39 +0,0 @@
-#!/bin/sh /etc/rc.common
-
-START=99
-PID=/var/run/ffwatchd.pid
-BIN=/usr/sbin/ffwatchd
-
-boot()
-{
- # If watchdog service is enabled, install cronjob, create device node and start daemon
- if /etc/init.d/freifunk-watchdog enabled 2>/dev/null; then
- if ! grep -q "$BIN" /etc/crontabs/root 2>/dev/null; then
- echo "* * * * * $BIN running || /etc/init.d/freifunk-watchdog restart" >> /etc/crontabs/root
- fi
-
- mknod /dev/watchdog c 10 130
-
- start
-
- # If service is disabled, find and remove related cronjob
- elif grep -q "$BIN" /etc/crontabs/root 2>/dev/null; then
- sed -i -e "\\'$BIN'd" /etc/crontabs/root
- fi
-}
-
-start()
-{
- start-stop-daemon -q -b -m -p $PID -x $BIN -S
-}
-
-stop()
-{
- start-stop-daemon -q -p $PID -x $BIN -K
-
- if ! /etc/init.d/freifunk-watchdog enabled; then
- if grep -q "$BIN" /etc/crontabs/root 2>/dev/null; then
- sed -i -e "\\'$BIN'd" /etc/crontabs/root
- fi
- fi
-}
diff --git a/contrib/package/freifunk-watchdog/src/Makefile b/contrib/package/freifunk-watchdog/src/Makefile
deleted file mode 100644
index e049ebc85..000000000
--- a/contrib/package/freifunk-watchdog/src/Makefile
+++ /dev/null
@@ -1,12 +0,0 @@
-WD_BINARY:=ffwatchd
-WD_CFLAGS:=$(CFLAGS) -c -DBINARY=\"$(WD_BINARY)\"
-WD_LDFLAGS:=$(LDFLAGS) -lm -luci
-
-watchdog:
- $(CC) $(WD_CFLAGS) -o ucix.o ucix.c
- $(CC) $(WD_CFLAGS) -o watchdog.o watchdog.c
- $(CC) $(WD_LDFLAGS) -o $(WD_BINARY) watchdog.o ucix.o
-
-clean:
- rm -f *~ $(WD_BINARY) *.o
-
diff --git a/contrib/package/freifunk-watchdog/src/ucix.c b/contrib/package/freifunk-watchdog/src/ucix.c
deleted file mode 100644
index f2f69fc36..000000000
--- a/contrib/package/freifunk-watchdog/src/ucix.c
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
- *
- * Copyright (C) 2008 John Crispin <blogic@openwrt.org>
- *
- * Changed by Jo-Philipp Wich <jow@openwrt.org>
- */
-
-#include <string.h>
-#include <stdlib.h>
-
-#include <uci_config.h>
-#include <uci.h>
-#include "ucix.h"
-
-static struct uci_ptr ptr;
-
-static inline int ucix_get_ptr(struct uci_context *ctx, const char *p, const char *s, const char *o, const char *t)
-{
- memset(&ptr, 0, sizeof(ptr));
- ptr.package = p;
- ptr.section = s;
- ptr.option = o;
- ptr.value = t;
- return uci_lookup_ptr(ctx, &ptr, NULL, true);
-}
-
-struct uci_context* ucix_init(const char *config_file)
-{
- struct uci_context *ctx = uci_alloc_context();
-#ifdef uci_to_delta
- uci_add_delta_path(ctx, "/var/state");
-#else
- uci_add_history_path(ctx, "/var/state");
-#endif
- if(uci_load(ctx, config_file, NULL) != UCI_OK)
- {
- return NULL;
- }
- return ctx;
-}
-
-void ucix_cleanup(struct uci_context *ctx)
-{
- uci_free_context(ctx);
-}
-
-const char* ucix_get_option(struct uci_context *ctx, const char *p, const char *s, const char *o)
-{
- struct uci_element *e = NULL;
- const char *value = NULL;
- if(ucix_get_ptr(ctx, p, s, o, NULL))
- return NULL;
- if (!(ptr.flags & UCI_LOOKUP_COMPLETE))
- return NULL;
- e = ptr.last;
- switch (e->type)
- {
- case UCI_TYPE_SECTION:
- value = uci_to_section(e)->type;
- break;
- case UCI_TYPE_OPTION:
- switch(ptr.o->type) {
- case UCI_TYPE_STRING:
- value = ptr.o->v.string;
- break;
- default:
- value = NULL;
- break;
- }
- break;
- default:
- return 0;
- }
-
- return value;
-}
-
-void ucix_for_each_section_type(struct uci_context *ctx,
- const char *p, const char *t,
- void (*cb)(const char*, void*), void *priv)
-{
- struct uci_element *e;
- if(ucix_get_ptr(ctx, p, NULL, NULL, NULL))
- return;
- uci_foreach_element(&ptr.p->sections, e)
- if (!strcmp(t, uci_to_section(e)->type))
- cb(e->name, priv);
-}
-
diff --git a/contrib/package/freifunk-watchdog/src/ucix.h b/contrib/package/freifunk-watchdog/src/ucix.h
deleted file mode 100644
index b1f5ec3f6..000000000
--- a/contrib/package/freifunk-watchdog/src/ucix.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
- *
- * Copyright (C) 2008 John Crispin <blogic@openwrt.org>
- */
-
-#ifndef _UCI_H__
-#define _UCI_H__
-struct uci_context* ucix_init(const char *config_file);
-
-void ucix_for_each_section_type(struct uci_context *ctx,
- const char *p, const char *t,
- void (*cb)(const char*, void*), void *priv);
-
-const char* ucix_get_option(struct uci_context *ctx,
- const char *p, const char *s, const char *o);
-#endif
diff --git a/contrib/package/freifunk-watchdog/src/watchdog.c b/contrib/package/freifunk-watchdog/src/watchdog.c
deleted file mode 100644
index 4bc3ab0b6..000000000
--- a/contrib/package/freifunk-watchdog/src/watchdog.c
+++ /dev/null
@@ -1,527 +0,0 @@
-/*
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
- *
- * Copyright (C) 2009 Jo-Philipp Wich <jow@openwrt.org>
- */
-
-#include "watchdog.h"
-
-/* Global watchdog fd, required by signal handler */
-int wdfd = -1;
-
-/* Handle finished children */
-static void sigchld_handler(int sig)
-{
- pid_t pid;
-
- while( (pid = waitpid(-1, NULL, WNOHANG)) > 0 )
- syslog(LOG_INFO, "Child returned (pid %d)", pid);
-}
-
-/* Watchdog shutdown helper */
-static void shutdown_watchdog(int sig)
-{
- static const char wshutdown = WATCH_SHUTDOWN;
-
- if( wdfd > -1 )
- {
- syslog(LOG_INFO, "Stopping watchdog timer");
- write(wdfd, &wshutdown, 1);
- close(wdfd);
- wdfd = -1;
- }
-
- exit(0);
-}
-
-/* Get BSSID of given interface */
-static int iw_get_bssid(int iwfd, const char *ifname, char *bssid)
-{
- struct iwreq iwrq;
-
- if( iw_ioctl(iwfd, ifname, SIOCGIWAP, &iwrq) >= 0 )
- {
- unsigned char *addr = (unsigned char *)iwrq.u.ap_addr.sa_data;
-
- sprintf(bssid, "%02X:%02X:%02X:%02X:%02X:%02X",
- addr[0], addr[1], addr[2], addr[3], addr[4], addr[5]);
-
- return 0;
- }
-
- return -1;
-}
-
-/* Get channel of given interface */
-static int iw_get_channel(int iwfd, const char *ifname, int *channel)
-{
- int i;
- char buffer[sizeof(struct iw_range)];
- double cur_freq, cmp_freq;
- struct iwreq iwrq;
- struct iw_range *range;
-
- memset(buffer, 0, sizeof(buffer));
-
- iwrq.u.data.pointer = (char *)buffer;
- iwrq.u.data.length = sizeof(buffer);
- iwrq.u.data.flags = 0;
-
- if( iw_ioctl(iwfd, ifname, SIOCGIWRANGE, &iwrq) < 0)
- {
- *channel = -1;
- return -1;
- }
-
- range = (struct iw_range *)buffer;
-
- if( iw_ioctl(iwfd, ifname, SIOCGIWFREQ, &iwrq) >= 0 )
- {
- cur_freq = ((double)iwrq.u.freq.m) * pow(10, iwrq.u.freq.e);
- if( cur_freq < 1000.00 )
- {
- *channel = (int)cur_freq;
- return 0;
- }
-
- for(i = 0; i < range->num_frequency; i++)
- {
- cmp_freq = ((double)range->freq[i].m) * pow(10, range->freq[i].e);
- if( cmp_freq == cur_freq )
- {
- *channel = (int)range->freq[i].i;
- return 0;
- }
- }
- }
-
- *channel = -1;
- return -1;
-}
-
-/* Get the (first) pid of given process name */
-static int find_process(const char *name)
-{
- int pid = -1;
- int file;
- char buffer[128];
- char cmpname[128];
- DIR *dir;
- struct dirent *entry;
-
- if( (dir = opendir("/proc")) != NULL )
- {
- snprintf(cmpname, sizeof(cmpname), "Name:\t%s\n", name);
-
- while( (entry = readdir(dir)) != NULL )
- {
- if( !strcmp(entry->d_name, "..") || !isdigit(*entry->d_name) )
- continue;
-
- sprintf(buffer, "/proc/%s/status", entry->d_name);
- if( (file = open(buffer, O_RDONLY)) > -1 )
- {
- read(file, buffer, sizeof(buffer));
- close(file);
-
- if( strstr(buffer, cmpname) == buffer )
- {
- pid = atoi(entry->d_name);
-
- /* Skip myself ... */
- if( pid == getpid() )
- pid = -1;
- else
- break;
- }
- }
- }
-
- closedir(dir);
- return pid;
- }
-
- syslog(LOG_CRIT, "Unable to open /proc: %s",
- strerror(errno));
-
- return -1;
-}
-
-/* Get the 5 minute load average */
-static double find_loadavg(void)
-{
- int fd;
- char buffer[10];
- double load = 0.00;
-
- if( (fd = open("/proc/loadavg", O_RDONLY)) > -1 )
- {
- if( read(fd, buffer, sizeof(buffer)) == sizeof(buffer) )
- load = atof(&buffer[5]);
-
- close(fd);
- }
-
- return load;
-}
-
-/* Check if given uci file was updated */
-static int check_uci_update(const char *config, time_t *mtime)
-{
- struct stat s;
- char path[128];
-
- snprintf(path, sizeof(path), "/var/state/%s", config);
- if( stat(path, &s) > -1 )
- {
- if( (*mtime == 0) || (s.st_mtime > *mtime) )
- {
- *mtime = s.st_mtime;
- return 1;
- }
- }
-
- return 0;
-}
-
-/* Add tuple */
-static void load_wifi_uci_add_iface(const char *section, struct uci_wifi_iface_itr_ctx *itr)
-{
- wifi_tuple_t *t;
- const char *ucitmp;
- int val = 0;
-
- ucitmp = ucix_get_option(itr->ctx, "wireless", section, "mode");
- if( ucitmp && !strncmp(ucitmp, "adhoc", 5) )
- {
- if( (t = (wifi_tuple_t *)malloc(sizeof(wifi_tuple_t))) != NULL )
- {
- ucitmp = ucix_get_option(itr->ctx, "wireless", section, "ifname");
- if(ucitmp)
- {
- strncpy(t->ifname, ucitmp, sizeof(t->ifname));
- val++;
- }
-
- ucitmp = ucix_get_option(itr->ctx, "wireless", section, "bssid");
- if(ucitmp)
- {
- strncpy(t->bssid, ucitmp, sizeof(t->bssid));
- val++;
- }
-
- ucitmp = ucix_get_option(itr->ctx, "wireless", section, "device");
- if(ucitmp)
- {
- ucitmp = ucix_get_option(itr->ctx, "wireless", ucitmp, "channel");
- if(ucitmp)
- {
- t->channel = atoi(ucitmp);
- val++;
- }
- }
-
- if( val == 3 )
- {
- syslog(LOG_INFO, "Monitoring %s: bssid=%s channel=%d",
- t->ifname, t->bssid, t->channel);
-
- t->next = itr->list;
- itr->list = t;
- }
- else
- {
- free(t);
- }
- }
- }
-}
-
-/* Load config */
-static wifi_tuple_t * load_wifi_uci(wifi_tuple_t *ifs, time_t *modtime)
-{
- struct uci_context *ctx;
- struct uci_wifi_iface_itr_ctx itr;
- wifi_tuple_t *cur, *next;
-
- if( check_uci_update("wireless", modtime) )
- {
- syslog(LOG_INFO, "Wireless config changed, reloading");
-
- if( (ctx = ucix_init("wireless")) != NULL )
- {
- if( ifs != NULL )
- {
- for(cur = ifs; cur; cur = next)
- {
- next = cur->next;
- free(cur);
- }
- }
-
- itr.list = NULL;
- itr.ctx = ctx;
-
- ucix_for_each_section_type(ctx, "wireless", "wifi-iface",
- (void *)load_wifi_uci_add_iface, &itr);
-
- return itr.list;
- }
- }
-
- return ifs;
-}
-
-/* Add tuple */
-static void load_watchdog_uci_add_process(const char *section, struct uci_process_itr_ctx *itr)
-{
- process_tuple_t *t;
- const char *ucitmp;
- int val = 0;
-
- if( (t = (process_tuple_t *)malloc(sizeof(process_tuple_t))) != NULL )
- {
- t->restart = 0;
-
- ucitmp = ucix_get_option(itr->ctx, "freifunk-watchdog", section, "process");
- if(ucitmp)
- {
- strncpy(t->process, ucitmp, sizeof(t->process));
- val++;
- }
-
- ucitmp = ucix_get_option(itr->ctx, "freifunk-watchdog", section, "initscript");
- if(ucitmp)
- {
- strncpy(t->initscript, ucitmp, sizeof(t->initscript));
- val++;
- }
-
- if( val == 2 )
- {
- syslog(LOG_INFO, "Monitoring %s: initscript=%s",
- t->process, t->initscript);
-
- t->next = itr->list;
- itr->list = t;
- }
- else
- {
- free(t);
- }
- }
-}
-
-/* Load config */
-static process_tuple_t * load_watchdog_uci(process_tuple_t *procs)
-{
- struct uci_context *ctx;
- struct uci_process_itr_ctx itr;
- process_tuple_t *cur, *next;
-
- syslog(LOG_INFO, "Loading watchdog config");
-
- if( (ctx = ucix_init("freifunk-watchdog")) != NULL )
- {
- if( procs != NULL )
- {
- for(cur = procs; cur; cur = next)
- {
- next = cur->next;
- free(cur);
- }
- }
-
- itr.list = NULL;
- itr.ctx = ctx;
-
- ucix_for_each_section_type(ctx, "freifunk-watchdog", "process",
- (void *)load_watchdog_uci_add_process, &itr);
-
- return itr.list;
- }
-
- return procs;
-}
-
-/* Daemon implementation */
-static int do_daemon(void)
-{
- static int wdtrigger = 1;
- static int wdtimeout = BASE_INTERVAL * 2;
- static const char wdkeepalive = WATCH_KEEPALIVE;
-
- int iwfd;
- int channel;
- char bssid[18];
- struct sigaction sa;
-
- wifi_tuple_t *ifs = NULL, *curr_if;
- process_tuple_t *procs = NULL, *curr_proc;
- time_t wireless_modtime = 0;
-
- int action_intv = 0;
- int restart_wifi = 0;
- int loadavg_panic = 0;
-
- openlog(SYSLOG_IDENT, 0, LOG_DAEMON);
- memset(&sa, 0, sizeof(sa));
-
- if( (iwfd = socket(AF_INET, SOCK_DGRAM, 0)) == -1 )
- {
- syslog(LOG_ERR, "Can not open wireless control socket: %s",
- strerror(errno));
-
- return 1;
- }
-
- if( (wdfd = open(WATCH_DEVICE, O_WRONLY)) > -1 )
- {
- syslog(LOG_INFO, "Opened %s - polling every %i seconds",
- WATCH_DEVICE, BASE_INTERVAL);
-
- /* Install signal handler to halt watchdog on shutdown */
- sa.sa_handler = shutdown_watchdog;
- sa.sa_flags = SA_NOCLDWAIT | SA_RESTART;
- sigaction(SIGHUP, &sa, NULL);
- sigaction(SIGINT, &sa, NULL);
- sigaction(SIGPIPE, &sa, NULL);
- sigaction(SIGTERM, &sa, NULL);
- sigaction(SIGUSR1, &sa, NULL);
- sigaction(SIGUSR2, &sa, NULL);
-
- /* Set watchdog timeout to twice the interval */
- ioctl(wdfd, WDIOC_SETTIMEOUT, &wdtimeout);
- }
-
- /* Install signal handler to reap children */
- sa.sa_handler = sigchld_handler;
- sa.sa_flags = 0;
- sigaction(SIGCHLD, &sa, NULL);
-
- /* Load watchdog configuration only once */
- procs = load_watchdog_uci(procs);
-
- while( 1 )
- {
- /* Check/increment action interval */
- if( ++action_intv >= ACTION_INTERVAL )
- {
- /* Reset action interval */
- action_intv = 0;
-
- /* Check average load */
- if( find_loadavg() >= LOAD_TRESHOLD )
- loadavg_panic++;
- else
- loadavg_panic = 0;
-
- /* Check wireless interfaces */
- ifs = load_wifi_uci(ifs, &wireless_modtime);
- for( curr_if = ifs; curr_if; curr_if = curr_if->next )
- {
- /* Get current channel and bssid */
- if( (iw_get_bssid(iwfd, curr_if->ifname, bssid) == 0) &&
- (iw_get_channel(iwfd, curr_if->ifname, &channel) == 0) )
- {
- /* Check BSSID */
- if( strcasecmp(bssid, curr_if->bssid) != 0 )
- {
- syslog(LOG_WARNING, "BSSID mismatch on %s: current=%s wanted=%s",
- curr_if->ifname, bssid, curr_if->bssid);
-
- restart_wifi++;
- }
-
- /* Check channel */
- else if( channel != curr_if->channel )
- {
- syslog(LOG_WARNING, "Channel mismatch on %s: current=%d wanted=%d",
- curr_if->ifname, channel, curr_if->channel);
-
- restart_wifi++;
- }
- }
- else
- {
- syslog(LOG_WARNING, "Requested interface %s not present", curr_if->ifname);
- }
- }
-
- /* Check processes */
- for( curr_proc = procs; curr_proc; curr_proc = curr_proc->next )
- {
- if( find_process(curr_proc->process) < 0 )
- curr_proc->restart++;
- else
- curr_proc->restart = 0;
-
- /* Process restart required? */
- if( curr_proc->restart >= HYSTERESIS )
- {
- curr_proc->restart = 0;
- syslog(LOG_WARNING, "The %s process died, restarting", curr_proc->process);
- EXEC(PROC_ACTION);
- }
- }
-
-
- /* Wifi restart required? */
- if( restart_wifi >= HYSTERESIS )
- {
- restart_wifi = 0;
- syslog(LOG_WARNING, "Channel or BSSID mismatch on wireless interface, restarting");
- EXEC(WIFI_ACTION);
- }
-
- /* Is there a load problem? */
- if( loadavg_panic >= HYSTERESIS )
- {
- syslog(LOG_EMERG, "Critical system load level, triggering reset!");
-
- /* Try watchdog, fall back to reboot */
- if( wdfd > -1 )
- ioctl(wdfd, WDIOC_SETTIMEOUT, &wdtrigger);
- else
- EXEC(LOAD_ACTION);
- }
- }
-
-
- /* Reset watchdog timer */
- if( wdfd > -1 )
- write(wdfd, &wdkeepalive, 1);
-
- sleep(BASE_INTERVAL);
- }
-
- shutdown_watchdog(0);
- closelog();
-
- return 0;
-}
-
-
-int main(int argc, char *argv[])
-{
- /* Check if watchdog is running ... */
- if( (argc > 1) && (strcmp(argv[1], "running") == 0) )
- {
- return (find_process(BINARY) == -1);
- }
-
- /* Start daemon */
- return do_daemon();
-}
diff --git a/contrib/package/freifunk-watchdog/src/watchdog.h b/contrib/package/freifunk-watchdog/src/watchdog.h
deleted file mode 100644
index c622856da..000000000
--- a/contrib/package/freifunk-watchdog/src/watchdog.h
+++ /dev/null
@@ -1,142 +0,0 @@
-/*
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
- *
- * Copyright (C) 2009 Jo-Philipp Wich <jow@openwrt.org>
- */
-
-#include <stdio.h>
-#include <string.h>
-#include <unistd.h>
-#include <stdint.h>
-#include <stdlib.h>
-#include <syslog.h>
-#include <ctype.h>
-#include <errno.h>
-#include <dirent.h>
-#include <fcntl.h>
-#include <math.h>
-#include <time.h>
-#include <signal.h>
-#include <limits.h>
-#include <sys/wait.h>
-#include <sys/stat.h>
-#include <sys/ioctl.h>
-#include <sys/socket.h>
-#include <linux/types.h>
-#include <linux/watchdog.h>
-
-#include "ucix.h"
-#include "wireless.22.h"
-
-
-/* Watchdog poll interval */
-#define BASE_INTERVAL 5
-
-/* Action interval (N * BASE_INTERVAL) */
-#define ACTION_INTERVAL 6
-
-/* Hysteresis */
-#define HYSTERESIS 3
-
-/* How to call myself in the logs */
-#define SYSLOG_IDENT "Freifunk Watchdog"
-
-/* Process error action */
-#define PROC_ACTION curr_proc->initscript, curr_proc->initscript, "restart"
-
-/* Wifi error action */
-#define WIFI_ACTION "/sbin/wifi", "/sbin/wifi"
-
-/* Watchdog device */
-#define WATCH_DEVICE "/dev/watchdog"
-#define WATCH_SHUTDOWN 'V'
-#define WATCH_KEEPALIVE '\0'
-
-/* System load error action and threshold */
-#define LOAD_TRESHOLD 15.00
-#define LOAD_ACTION "/sbin/reboot", "/sbin/reboot"
-
-/* Fallback binary name (passed by makefile) */
-#ifndef BINARY
-#define BINARY "ffwatchd"
-#endif
-
-
-/* ifname/bssid/channel tuples */
-struct wifi_tuple {
- char ifname[16];
- char bssid[18];
- int channel;
- struct wifi_tuple *next;
-};
-
-/* structure to hold tuple-list and uci context during iteration */
-struct uci_wifi_iface_itr_ctx {
- struct wifi_tuple *list;
- struct uci_context *ctx;
-};
-
-typedef struct wifi_tuple wifi_tuple_t;
-
-
-/* process name/exec tuples */
-struct process_tuple {
- char process[PATH_MAX + 1];
- char initscript[PATH_MAX + 1];
- int restart;
- struct process_tuple *next;
-};
-
-/* structure to hold tuple-list and uci context during iteration */
-struct uci_process_itr_ctx {
- struct process_tuple *list;
- struct uci_context *ctx;
-};
-
-typedef struct process_tuple process_tuple_t;
-
-
-/* ioctl() helper (stolen from iwlib) */
-static inline int
-iw_ioctl(int skfd, /* Socket to the kernel */
- const char * ifname, /* Device name */
- int request, /* WE ID */
- struct iwreq * pwrq) /* Fixed part of the request */
-{
- /* Set device name */
- strncpy(pwrq->ifr_ifrn.ifrn_name, ifname, 16);
-
- /* Do the request */
- return(ioctl(skfd, request, pwrq));
-}
-
-/* fork() & execl() helper */
-#define EXEC(x) \
- do { \
- switch(fork()) \
- { \
- case -1: \
- syslog(LOG_CRIT, "Unable to fork child: %s", \
- strerror(errno)); \
- break; \
- \
- case 0: \
- execl(x, NULL); \
- syslog(LOG_CRIT, "Unable to execute action: %s", \
- strerror(errno)); \
- return 1; \
- } \
- } while(0)
-
diff --git a/contrib/package/freifunk-watchdog/src/wireless.22.h b/contrib/package/freifunk-watchdog/src/wireless.22.h
deleted file mode 100644
index 1d19243f3..000000000
--- a/contrib/package/freifunk-watchdog/src/wireless.22.h
+++ /dev/null
@@ -1,1139 +0,0 @@
-/*
- * This file define a set of standard wireless extensions
- *
- * Version : 22 16.3.07
- *
- * Authors : Jean Tourrilhes - HPL - <jt@hpl.hp.com>
- * Copyright (c) 1997-2007 Jean Tourrilhes, All Rights Reserved.
- */
-
-#ifndef _LINUX_WIRELESS_H
-#define _LINUX_WIRELESS_H
-
-/************************** DOCUMENTATION **************************/
-/*
- * Initial APIs (1996 -> onward) :
- * -----------------------------
- * Basically, the wireless extensions are for now a set of standard ioctl
- * call + /proc/net/wireless
- *
- * The entry /proc/net/wireless give statistics and information on the
- * driver.
- * This is better than having each driver having its entry because
- * its centralised and we may remove the driver module safely.
- *
- * Ioctl are used to configure the driver and issue commands. This is
- * better than command line options of insmod because we may want to
- * change dynamically (while the driver is running) some parameters.
- *
- * The ioctl mechanimsm are copied from standard devices ioctl.
- * We have the list of command plus a structure descibing the
- * data exchanged...
- * Note that to add these ioctl, I was obliged to modify :
- * # net/core/dev.c (two place + add include)
- * # net/ipv4/af_inet.c (one place + add include)
- *
- * /proc/net/wireless is a copy of /proc/net/dev.
- * We have a structure for data passed from the driver to /proc/net/wireless
- * Too add this, I've modified :
- * # net/core/dev.c (two other places)
- * # include/linux/netdevice.h (one place)
- * # include/linux/proc_fs.h (one place)
- *
- * New driver API (2002 -> onward) :
- * -------------------------------
- * This file is only concerned with the user space API and common definitions.
- * The new driver API is defined and documented in :
- * # include/net/iw_handler.h
- *
- * Note as well that /proc/net/wireless implementation has now moved in :
- * # net/core/wireless.c
- *
- * Wireless Events (2002 -> onward) :
- * --------------------------------
- * Events are defined at the end of this file, and implemented in :
- * # net/core/wireless.c
- *
- * Other comments :
- * --------------
- * Do not add here things that are redundant with other mechanisms
- * (drivers init, ifconfig, /proc/net/dev, ...) and with are not
- * wireless specific.
- *
- * These wireless extensions are not magic : each driver has to provide
- * support for them...
- *
- * IMPORTANT NOTE : As everything in the kernel, this is very much a
- * work in progress. Contact me if you have ideas of improvements...
- */
-
-/***************************** INCLUDES *****************************/
-
-/* This header is used in user-space, therefore need to be sanitised
- * for that purpose. Those includes are usually not compatible with glibc.
- * To know which includes to use in user-space, check iwlib.h. */
-#ifdef __KERNEL__
-#include <linux/types.h> /* for "caddr_t" et al */
-#include <linux/socket.h> /* for "struct sockaddr" et al */
-#include <linux/if.h> /* for IFNAMSIZ and co... */
-#endif /* __KERNEL__ */
-
-/***************************** VERSION *****************************/
-/*
- * This constant is used to know the availability of the wireless
- * extensions and to know which version of wireless extensions it is
- * (there is some stuff that will be added in the future...)
- * I just plan to increment with each new version.
- */
-#define WIRELESS_EXT 22
-
-/*
- * Changes :
- *
- * V2 to V3
- * --------
- * Alan Cox start some incompatibles changes. I've integrated a bit more.
- * - Encryption renamed to Encode to avoid US regulation problems
- * - Frequency changed from float to struct to avoid problems on old 386
- *
- * V3 to V4
- * --------
- * - Add sensitivity
- *
- * V4 to V5
- * --------
- * - Missing encoding definitions in range
- * - Access points stuff
- *
- * V5 to V6
- * --------
- * - 802.11 support (ESSID ioctls)
- *
- * V6 to V7
- * --------
- * - define IW_ESSID_MAX_SIZE and IW_MAX_AP
- *
- * V7 to V8
- * --------
- * - Changed my e-mail address
- * - More 802.11 support (nickname, rate, rts, frag)
- * - List index in frequencies
- *
- * V8 to V9
- * --------
- * - Support for 'mode of operation' (ad-hoc, managed...)
- * - Support for unicast and multicast power saving
- * - Change encoding to support larger tokens (>64 bits)
- * - Updated iw_params (disable, flags) and use it for NWID
- * - Extracted iw_point from iwreq for clarity
- *
- * V9 to V10
- * ---------
- * - Add PM capability to range structure
- * - Add PM modifier : MAX/MIN/RELATIVE
- * - Add encoding option : IW_ENCODE_NOKEY
- * - Add TxPower ioctls (work like TxRate)
- *
- * V10 to V11
- * ----------
- * - Add WE version in range (help backward/forward compatibility)
- * - Add retry ioctls (work like PM)
- *
- * V11 to V12
- * ----------
- * - Add SIOCSIWSTATS to get /proc/net/wireless programatically
- * - Add DEV PRIVATE IOCTL to avoid collisions in SIOCDEVPRIVATE space
- * - Add new statistics (frag, retry, beacon)
- * - Add average quality (for user space calibration)
- *
- * V12 to V13
- * ----------
- * - Document creation of new driver API.
- * - Extract union iwreq_data from struct iwreq (for new driver API).
- * - Rename SIOCSIWNAME as SIOCSIWCOMMIT
- *
- * V13 to V14
- * ----------
- * - Wireless Events support : define struct iw_event
- * - Define additional specific event numbers
- * - Add "addr" and "param" fields in union iwreq_data
- * - AP scanning stuff (SIOCSIWSCAN and friends)
- *
- * V14 to V15
- * ----------
- * - Add IW_PRIV_TYPE_ADDR for struct sockaddr private arg
- * - Make struct iw_freq signed (both m & e), add explicit padding
- * - Add IWEVCUSTOM for driver specific event/scanning token
- * - Add IW_MAX_GET_SPY for driver returning a lot of addresses
- * - Add IW_TXPOW_RANGE for range of Tx Powers
- * - Add IWEVREGISTERED & IWEVEXPIRED events for Access Points
- * - Add IW_MODE_MONITOR for passive monitor
- *
- * V15 to V16
- * ----------
- * - Increase the number of bitrates in iw_range to 32 (for 802.11g)
- * - Increase the number of frequencies in iw_range to 32 (for 802.11b+a)
- * - Reshuffle struct iw_range for increases, add filler
- * - Increase IW_MAX_AP to 64 for driver returning a lot of addresses
- * - Remove IW_MAX_GET_SPY because conflict with enhanced spy support
- * - Add SIOCSIWTHRSPY/SIOCGIWTHRSPY and "struct iw_thrspy"
- * - Add IW_ENCODE_TEMP and iw_range->encoding_login_index
- *
- * V16 to V17
- * ----------
- * - Add flags to frequency -> auto/fixed
- * - Document (struct iw_quality *)->updated, add new flags (INVALID)
- * - Wireless Event capability in struct iw_range
- * - Add support for relative TxPower (yick !)
- *
- * V17 to V18 (From Jouni Malinen <jkmaline@cc.hut.fi>)
- * ----------
- * - Add support for WPA/WPA2
- * - Add extended encoding configuration (SIOCSIWENCODEEXT and
- * SIOCGIWENCODEEXT)
- * - Add SIOCSIWGENIE/SIOCGIWGENIE
- * - Add SIOCSIWMLME
- * - Add SIOCSIWPMKSA
- * - Add struct iw_range bit field for supported encoding capabilities
- * - Add optional scan request parameters for SIOCSIWSCAN
- * - Add SIOCSIWAUTH/SIOCGIWAUTH for setting authentication and WPA
- * related parameters (extensible up to 4096 parameter values)
- * - Add wireless events: IWEVGENIE, IWEVMICHAELMICFAILURE,
- * IWEVASSOCREQIE, IWEVASSOCRESPIE, IWEVPMKIDCAND
- *
- * V18 to V19
- * ----------
- * - Remove (struct iw_point *)->pointer from events and streams
- * - Remove header includes to help user space
- * - Increase IW_ENCODING_TOKEN_MAX from 32 to 64
- * - Add IW_QUAL_ALL_UPDATED and IW_QUAL_ALL_INVALID macros
- * - Add explicit flag to tell stats are in dBm : IW_QUAL_DBM
- * - Add IW_IOCTL_IDX() and IW_EVENT_IDX() macros
- *
- * V19 to V20
- * ----------
- * - RtNetlink requests support (SET/GET)
- *
- * V20 to V21
- * ----------
- * - Remove (struct net_device *)->get_wireless_stats()
- * - Change length in ESSID and NICK to strlen() instead of strlen()+1
- * - Add IW_RETRY_SHORT/IW_RETRY_LONG retry modifiers
- * - Power/Retry relative values no longer * 100000
- * - Add explicit flag to tell stats are in 802.11k RCPI : IW_QUAL_RCPI
- *
- * V21 to V22
- * ----------
- * - Prevent leaking of kernel space in stream on 64 bits.
- */
-
-/**************************** CONSTANTS ****************************/
-
-/* -------------------------- IOCTL LIST -------------------------- */
-
-/* Wireless Identification */
-#define SIOCSIWCOMMIT 0x8B00 /* Commit pending changes to driver */
-#define SIOCGIWNAME 0x8B01 /* get name == wireless protocol */
-/* SIOCGIWNAME is used to verify the presence of Wireless Extensions.
- * Common values : "IEEE 802.11-DS", "IEEE 802.11-FH", "IEEE 802.11b"...
- * Don't put the name of your driver there, it's useless. */
-
-/* Basic operations */
-#define SIOCSIWNWID 0x8B02 /* set network id (pre-802.11) */
-#define SIOCGIWNWID 0x8B03 /* get network id (the cell) */
-#define SIOCSIWFREQ 0x8B04 /* set channel/frequency (Hz) */
-#define SIOCGIWFREQ 0x8B05 /* get channel/frequency (Hz) */
-#define SIOCSIWMODE 0x8B06 /* set operation mode */
-#define SIOCGIWMODE 0x8B07 /* get operation mode */
-#define SIOCSIWSENS 0x8B08 /* set sensitivity (dBm) */
-#define SIOCGIWSENS 0x8B09 /* get sensitivity (dBm) */
-
-/* Informative stuff */
-#define SIOCSIWRANGE 0x8B0A /* Unused */
-#define SIOCGIWRANGE 0x8B0B /* Get range of parameters */
-#define SIOCSIWPRIV 0x8B0C /* Unused */
-#define SIOCGIWPRIV 0x8B0D /* get private ioctl interface info */
-#define SIOCSIWSTATS 0x8B0E /* Unused */
-#define SIOCGIWSTATS 0x8B0F /* Get /proc/net/wireless stats */
-/* SIOCGIWSTATS is strictly used between user space and the kernel, and
- * is never passed to the driver (i.e. the driver will never see it). */
-
-/* Spy support (statistics per MAC address - used for Mobile IP support) */
-#define SIOCSIWSPY 0x8B10 /* set spy addresses */
-#define SIOCGIWSPY 0x8B11 /* get spy info (quality of link) */
-#define SIOCSIWTHRSPY 0x8B12 /* set spy threshold (spy event) */
-#define SIOCGIWTHRSPY 0x8B13 /* get spy threshold */
-
-/* Access Point manipulation */
-#define SIOCSIWAP 0x8B14 /* set access point MAC addresses */
-#define SIOCGIWAP 0x8B15 /* get access point MAC addresses */
-#define SIOCGIWAPLIST 0x8B17 /* Deprecated in favor of scanning */
-#define SIOCSIWSCAN 0x8B18 /* trigger scanning (list cells) */
-#define SIOCGIWSCAN 0x8B19 /* get scanning results */
-
-/* 802.11 specific support */
-#define SIOCSIWESSID 0x8B1A /* set ESSID (network name) */
-#define SIOCGIWESSID 0x8B1B /* get ESSID */
-#define SIOCSIWNICKN 0x8B1C /* set node name/nickname */
-#define SIOCGIWNICKN 0x8B1D /* get node name/nickname */
-/* As the ESSID and NICKN are strings up to 32 bytes long, it doesn't fit
- * within the 'iwreq' structure, so we need to use the 'data' member to
- * point to a string in user space, like it is done for RANGE... */
-
-/* Other parameters useful in 802.11 and some other devices */
-#define SIOCSIWRATE 0x8B20 /* set default bit rate (bps) */
-#define SIOCGIWRATE 0x8B21 /* get default bit rate (bps) */
-#define SIOCSIWRTS 0x8B22 /* set RTS/CTS threshold (bytes) */
-#define SIOCGIWRTS 0x8B23 /* get RTS/CTS threshold (bytes) */
-#define SIOCSIWFRAG 0x8B24 /* set fragmentation thr (bytes) */
-#define SIOCGIWFRAG 0x8B25 /* get fragmentation thr (bytes) */
-#define SIOCSIWTXPOW 0x8B26 /* set transmit power (dBm) */
-#define SIOCGIWTXPOW 0x8B27 /* get transmit power (dBm) */
-#define SIOCSIWRETRY 0x8B28 /* set retry limits and lifetime */
-#define SIOCGIWRETRY 0x8B29 /* get retry limits and lifetime */
-
-/* Encoding stuff (scrambling, hardware security, WEP...) */
-#define SIOCSIWENCODE 0x8B2A /* set encoding token & mode */
-#define SIOCGIWENCODE 0x8B2B /* get encoding token & mode */
-/* Power saving stuff (power management, unicast and multicast) */
-#define SIOCSIWPOWER 0x8B2C /* set Power Management settings */
-#define SIOCGIWPOWER 0x8B2D /* get Power Management settings */
-/* Modulation bitmask */
-#define SIOCSIWMODUL 0x8B2E /* set Modulations settings */
-#define SIOCGIWMODUL 0x8B2F /* get Modulations settings */
-
-/* WPA : Generic IEEE 802.11 informatiom element (e.g., for WPA/RSN/WMM).
- * This ioctl uses struct iw_point and data buffer that includes IE id and len
- * fields. More than one IE may be included in the request. Setting the generic
- * IE to empty buffer (len=0) removes the generic IE from the driver. Drivers
- * are allowed to generate their own WPA/RSN IEs, but in these cases, drivers
- * are required to report the used IE as a wireless event, e.g., when
- * associating with an AP. */
-#define SIOCSIWGENIE 0x8B30 /* set generic IE */
-#define SIOCGIWGENIE 0x8B31 /* get generic IE */
-
-/* WPA : IEEE 802.11 MLME requests */
-#define SIOCSIWMLME 0x8B16 /* request MLME operation; uses
- * struct iw_mlme */
-/* WPA : Authentication mode parameters */
-#define SIOCSIWAUTH 0x8B32 /* set authentication mode params */
-#define SIOCGIWAUTH 0x8B33 /* get authentication mode params */
-
-/* WPA : Extended version of encoding configuration */
-#define SIOCSIWENCODEEXT 0x8B34 /* set encoding token & mode */
-#define SIOCGIWENCODEEXT 0x8B35 /* get encoding token & mode */
-
-/* WPA2 : PMKSA cache management */
-#define SIOCSIWPMKSA 0x8B36 /* PMKSA cache operation */
-
-/* -------------------- DEV PRIVATE IOCTL LIST -------------------- */
-
-/* These 32 ioctl are wireless device private, for 16 commands.
- * Each driver is free to use them for whatever purpose it chooses,
- * however the driver *must* export the description of those ioctls
- * with SIOCGIWPRIV and *must* use arguments as defined below.
- * If you don't follow those rules, DaveM is going to hate you (reason :
- * it make mixed 32/64bit operation impossible).
- */
-#define SIOCIWFIRSTPRIV 0x8BE0
-#define SIOCIWLASTPRIV 0x8BFF
-/* Previously, we were using SIOCDEVPRIVATE, but we now have our
- * separate range because of collisions with other tools such as
- * 'mii-tool'.
- * We now have 32 commands, so a bit more space ;-).
- * Also, all 'even' commands are only usable by root and don't return the
- * content of ifr/iwr to user (but you are not obliged to use the set/get
- * convention, just use every other two command). More details in iwpriv.c.
- * And I repeat : you are not forced to use them with iwpriv, but you
- * must be compliant with it.
- */
-
-/* ------------------------- IOCTL STUFF ------------------------- */
-
-/* The first and the last (range) */
-#define SIOCIWFIRST 0x8B00
-#define SIOCIWLAST SIOCIWLASTPRIV /* 0x8BFF */
-#define IW_IOCTL_IDX(cmd) ((cmd) - SIOCIWFIRST)
-
-/* Odd : get (world access), even : set (root access) */
-#define IW_IS_SET(cmd) (!((cmd) & 0x1))
-#define IW_IS_GET(cmd) ((cmd) & 0x1)
-
-/* ----------------------- WIRELESS EVENTS ----------------------- */
-/* Those are *NOT* ioctls, do not issue request on them !!! */
-/* Most events use the same identifier as ioctl requests */
-
-#define IWEVTXDROP 0x8C00 /* Packet dropped to excessive retry */
-#define IWEVQUAL 0x8C01 /* Quality part of statistics (scan) */
-#define IWEVCUSTOM 0x8C02 /* Driver specific ascii string */
-#define IWEVREGISTERED 0x8C03 /* Discovered a new node (AP mode) */
-#define IWEVEXPIRED 0x8C04 /* Expired a node (AP mode) */
-#define IWEVGENIE 0x8C05 /* Generic IE (WPA, RSN, WMM, ..)
- * (scan results); This includes id and
- * length fields. One IWEVGENIE may
- * contain more than one IE. Scan
- * results may contain one or more
- * IWEVGENIE events. */
-#define IWEVMICHAELMICFAILURE 0x8C06 /* Michael MIC failure
- * (struct iw_michaelmicfailure)
- */
-#define IWEVASSOCREQIE 0x8C07 /* IEs used in (Re)Association Request.
- * The data includes id and length
- * fields and may contain more than one
- * IE. This event is required in
- * Managed mode if the driver
- * generates its own WPA/RSN IE. This
- * should be sent just before
- * IWEVREGISTERED event for the
- * association. */
-#define IWEVASSOCRESPIE 0x8C08 /* IEs used in (Re)Association
- * Response. The data includes id and
- * length fields and may contain more
- * than one IE. This may be sent
- * between IWEVASSOCREQIE and
- * IWEVREGISTERED events for the
- * association. */
-#define IWEVPMKIDCAND 0x8C09 /* PMKID candidate for RSN
- * pre-authentication
- * (struct iw_pmkid_cand) */
-
-#define IWEVFIRST 0x8C00
-#define IW_EVENT_IDX(cmd) ((cmd) - IWEVFIRST)
-
-/* ------------------------- PRIVATE INFO ------------------------- */
-/*
- * The following is used with SIOCGIWPRIV. It allow a driver to define
- * the interface (name, type of data) for its private ioctl.
- * Privates ioctl are SIOCIWFIRSTPRIV -> SIOCIWLASTPRIV
- */
-
-#define IW_PRIV_TYPE_MASK 0x7000 /* Type of arguments */
-#define IW_PRIV_TYPE_NONE 0x0000
-#define IW_PRIV_TYPE_BYTE 0x1000 /* Char as number */
-#define IW_PRIV_TYPE_CHAR 0x2000 /* Char as character */
-#define IW_PRIV_TYPE_INT 0x4000 /* 32 bits int */
-#define IW_PRIV_TYPE_FLOAT 0x5000 /* struct iw_freq */
-#define IW_PRIV_TYPE_ADDR 0x6000 /* struct sockaddr */
-
-#define IW_PRIV_SIZE_FIXED 0x0800 /* Variable or fixed number of args */
-
-#define IW_PRIV_SIZE_MASK 0x07FF /* Max number of those args */
-
-/*
- * Note : if the number of args is fixed and the size < 16 octets,
- * instead of passing a pointer we will put args in the iwreq struct...
- */
-
-/* ----------------------- OTHER CONSTANTS ----------------------- */
-
-/* Maximum frequencies in the range struct */
-#define IW_MAX_FREQUENCIES 32
-/* Note : if you have something like 80 frequencies,
- * don't increase this constant and don't fill the frequency list.
- * The user will be able to set by channel anyway... */
-
-/* Maximum bit rates in the range struct */
-#define IW_MAX_BITRATES 32
-
-/* Maximum tx powers in the range struct */
-#define IW_MAX_TXPOWER 8
-/* Note : if you more than 8 TXPowers, just set the max and min or
- * a few of them in the struct iw_range. */
-
-/* Maximum of address that you may set with SPY */
-#define IW_MAX_SPY 8
-
-/* Maximum of address that you may get in the
- list of access points in range */
-#define IW_MAX_AP 64
-
-/* Maximum size of the ESSID and NICKN strings */
-#define IW_ESSID_MAX_SIZE 32
-
-/* Modes of operation */
-#define IW_MODE_AUTO 0 /* Let the driver decides */
-#define IW_MODE_ADHOC 1 /* Single cell network */
-#define IW_MODE_INFRA 2 /* Multi cell network, roaming, ... */
-#define IW_MODE_MASTER 3 /* Synchronisation master or Access Point */
-#define IW_MODE_REPEAT 4 /* Wireless Repeater (forwarder) */
-#define IW_MODE_SECOND 5 /* Secondary master/repeater (backup) */
-#define IW_MODE_MONITOR 6 /* Passive monitor (listen only) */
-
-/* Statistics flags (bitmask in updated) */
-#define IW_QUAL_QUAL_UPDATED 0x01 /* Value was updated since last read */
-#define IW_QUAL_LEVEL_UPDATED 0x02
-#define IW_QUAL_NOISE_UPDATED 0x04
-#define IW_QUAL_ALL_UPDATED 0x07
-#define IW_QUAL_DBM 0x08 /* Level + Noise are dBm */
-#define IW_QUAL_QUAL_INVALID 0x10 /* Driver doesn't provide value */
-#define IW_QUAL_LEVEL_INVALID 0x20
-#define IW_QUAL_NOISE_INVALID 0x40
-#define IW_QUAL_RCPI 0x80 /* Level + Noise are 802.11k RCPI */
-#define IW_QUAL_ALL_INVALID 0x70
-
-/* Frequency flags */
-#define IW_FREQ_AUTO 0x00 /* Let the driver decides */
-#define IW_FREQ_FIXED 0x01 /* Force a specific value */
-
-/* Maximum number of size of encoding token available
- * they are listed in the range structure */
-#define IW_MAX_ENCODING_SIZES 8
-
-/* Maximum size of the encoding token in bytes */
-#define IW_ENCODING_TOKEN_MAX 64 /* 512 bits (for now) */
-
-/* Flags for encoding (along with the token) */
-#define IW_ENCODE_INDEX 0x00FF /* Token index (if needed) */
-#define IW_ENCODE_FLAGS 0xFF00 /* Flags defined below */
-#define IW_ENCODE_MODE 0xF000 /* Modes defined below */
-#define IW_ENCODE_DISABLED 0x8000 /* Encoding disabled */
-#define IW_ENCODE_ENABLED 0x0000 /* Encoding enabled */
-#define IW_ENCODE_RESTRICTED 0x4000 /* Refuse non-encoded packets */
-#define IW_ENCODE_OPEN 0x2000 /* Accept non-encoded packets */
-#define IW_ENCODE_NOKEY 0x0800 /* Key is write only, so not present */
-#define IW_ENCODE_TEMP 0x0400 /* Temporary key */
-
-/* Power management flags available (along with the value, if any) */
-#define IW_POWER_ON 0x0000 /* No details... */
-#define IW_POWER_TYPE 0xF000 /* Type of parameter */
-#define IW_POWER_PERIOD 0x1000 /* Value is a period/duration of */
-#define IW_POWER_TIMEOUT 0x2000 /* Value is a timeout (to go asleep) */
-#define IW_POWER_SAVING 0x4000 /* Value is relative (how aggressive)*/
-#define IW_POWER_MODE 0x0F00 /* Power Management mode */
-#define IW_POWER_UNICAST_R 0x0100 /* Receive only unicast messages */
-#define IW_POWER_MULTICAST_R 0x0200 /* Receive only multicast messages */
-#define IW_POWER_ALL_R 0x0300 /* Receive all messages though PM */
-#define IW_POWER_FORCE_S 0x0400 /* Force PM procedure for sending unicast */
-#define IW_POWER_REPEATER 0x0800 /* Repeat broadcast messages in PM period */
-#define IW_POWER_MODIFIER 0x000F /* Modify a parameter */
-#define IW_POWER_MIN 0x0001 /* Value is a minimum */
-#define IW_POWER_MAX 0x0002 /* Value is a maximum */
-#define IW_POWER_RELATIVE 0x0004 /* Value is not in seconds/ms/us */
-
-/* Transmit Power flags available */
-#define IW_TXPOW_TYPE 0x00FF /* Type of value */
-#define IW_TXPOW_DBM 0x0000 /* Value is in dBm */
-#define IW_TXPOW_MWATT 0x0001 /* Value is in mW */
-#define IW_TXPOW_RELATIVE 0x0002 /* Value is in arbitrary units */
-#define IW_TXPOW_RANGE 0x1000 /* Range of value between min/max */
-
-/* Retry limits and lifetime flags available */
-#define IW_RETRY_ON 0x0000 /* No details... */
-#define IW_RETRY_TYPE 0xF000 /* Type of parameter */
-#define IW_RETRY_LIMIT 0x1000 /* Maximum number of retries*/
-#define IW_RETRY_LIFETIME 0x2000 /* Maximum duration of retries in us */
-#define IW_RETRY_MODIFIER 0x00FF /* Modify a parameter */
-#define IW_RETRY_MIN 0x0001 /* Value is a minimum */
-#define IW_RETRY_MAX 0x0002 /* Value is a maximum */
-#define IW_RETRY_RELATIVE 0x0004 /* Value is not in seconds/ms/us */
-#define IW_RETRY_SHORT 0x0010 /* Value is for short packets */
-#define IW_RETRY_LONG 0x0020 /* Value is for long packets */
-
-/* Scanning request flags */
-#define IW_SCAN_DEFAULT 0x0000 /* Default scan of the driver */
-#define IW_SCAN_ALL_ESSID 0x0001 /* Scan all ESSIDs */
-#define IW_SCAN_THIS_ESSID 0x0002 /* Scan only this ESSID */
-#define IW_SCAN_ALL_FREQ 0x0004 /* Scan all Frequencies */
-#define IW_SCAN_THIS_FREQ 0x0008 /* Scan only this Frequency */
-#define IW_SCAN_ALL_MODE 0x0010 /* Scan all Modes */
-#define IW_SCAN_THIS_MODE 0x0020 /* Scan only this Mode */
-#define IW_SCAN_ALL_RATE 0x0040 /* Scan all Bit-Rates */
-#define IW_SCAN_THIS_RATE 0x0080 /* Scan only this Bit-Rate */
-/* struct iw_scan_req scan_type */
-#define IW_SCAN_TYPE_ACTIVE 0
-#define IW_SCAN_TYPE_PASSIVE 1
-/* Maximum size of returned data */
-#define IW_SCAN_MAX_DATA 4096 /* In bytes */
-
-/* Max number of char in custom event - use multiple of them if needed */
-#define IW_CUSTOM_MAX 256 /* In bytes */
-
-/* Generic information element */
-#define IW_GENERIC_IE_MAX 1024
-
-/* MLME requests (SIOCSIWMLME / struct iw_mlme) */
-#define IW_MLME_DEAUTH 0
-#define IW_MLME_DISASSOC 1
-#define IW_MLME_AUTH 2
-#define IW_MLME_ASSOC 3
-
-/* SIOCSIWAUTH/SIOCGIWAUTH struct iw_param flags */
-#define IW_AUTH_INDEX 0x0FFF
-#define IW_AUTH_FLAGS 0xF000
-/* SIOCSIWAUTH/SIOCGIWAUTH parameters (0 .. 4095)
- * (IW_AUTH_INDEX mask in struct iw_param flags; this is the index of the
- * parameter that is being set/get to; value will be read/written to
- * struct iw_param value field) */
-#define IW_AUTH_WPA_VERSION 0
-#define IW_AUTH_CIPHER_PAIRWISE 1
-#define IW_AUTH_CIPHER_GROUP 2
-#define IW_AUTH_KEY_MGMT 3
-#define IW_AUTH_TKIP_COUNTERMEASURES 4
-#define IW_AUTH_DROP_UNENCRYPTED 5
-#define IW_AUTH_80211_AUTH_ALG 6
-#define IW_AUTH_WPA_ENABLED 7
-#define IW_AUTH_RX_UNENCRYPTED_EAPOL 8
-#define IW_AUTH_ROAMING_CONTROL 9
-#define IW_AUTH_PRIVACY_INVOKED 10
-
-/* IW_AUTH_WPA_VERSION values (bit field) */
-#define IW_AUTH_WPA_VERSION_DISABLED 0x00000001
-#define IW_AUTH_WPA_VERSION_WPA 0x00000002
-#define IW_AUTH_WPA_VERSION_WPA2 0x00000004
-
-/* IW_AUTH_PAIRWISE_CIPHER and IW_AUTH_GROUP_CIPHER values (bit field) */
-#define IW_AUTH_CIPHER_NONE 0x00000001
-#define IW_AUTH_CIPHER_WEP40 0x00000002
-#define IW_AUTH_CIPHER_TKIP 0x00000004
-#define IW_AUTH_CIPHER_CCMP 0x00000008
-#define IW_AUTH_CIPHER_WEP104 0x00000010
-
-/* IW_AUTH_KEY_MGMT values (bit field) */
-#define IW_AUTH_KEY_MGMT_802_1X 1
-#define IW_AUTH_KEY_MGMT_PSK 2
-
-/* IW_AUTH_80211_AUTH_ALG values (bit field) */
-#define IW_AUTH_ALG_OPEN_SYSTEM 0x00000001
-#define IW_AUTH_ALG_SHARED_KEY 0x00000002
-#define IW_AUTH_ALG_LEAP 0x00000004
-
-/* IW_AUTH_ROAMING_CONTROL values */
-#define IW_AUTH_ROAMING_ENABLE 0 /* driver/firmware based roaming */
-#define IW_AUTH_ROAMING_DISABLE 1 /* user space program used for roaming
- * control */
-
-/* SIOCSIWENCODEEXT definitions */
-#define IW_ENCODE_SEQ_MAX_SIZE 8
-/* struct iw_encode_ext ->alg */
-#define IW_ENCODE_ALG_NONE 0
-#define IW_ENCODE_ALG_WEP 1
-#define IW_ENCODE_ALG_TKIP 2
-#define IW_ENCODE_ALG_CCMP 3
-/* struct iw_encode_ext ->ext_flags */
-#define IW_ENCODE_EXT_TX_SEQ_VALID 0x00000001
-#define IW_ENCODE_EXT_RX_SEQ_VALID 0x00000002
-#define IW_ENCODE_EXT_GROUP_KEY 0x00000004
-#define IW_ENCODE_EXT_SET_TX_KEY 0x00000008
-
-/* IWEVMICHAELMICFAILURE : struct iw_michaelmicfailure ->flags */
-#define IW_MICFAILURE_KEY_ID 0x00000003 /* Key ID 0..3 */
-#define IW_MICFAILURE_GROUP 0x00000004
-#define IW_MICFAILURE_PAIRWISE 0x00000008
-#define IW_MICFAILURE_STAKEY 0x00000010
-#define IW_MICFAILURE_COUNT 0x00000060 /* 1 or 2 (0 = count not supported)
- */
-
-/* Bit field values for enc_capa in struct iw_range */
-#define IW_ENC_CAPA_WPA 0x00000001
-#define IW_ENC_CAPA_WPA2 0x00000002
-#define IW_ENC_CAPA_CIPHER_TKIP 0x00000004
-#define IW_ENC_CAPA_CIPHER_CCMP 0x00000008
-
-/* Event capability macros - in (struct iw_range *)->event_capa
- * Because we have more than 32 possible events, we use an array of
- * 32 bit bitmasks. Note : 32 bits = 0x20 = 2^5. */
-#define IW_EVENT_CAPA_BASE(cmd) ((cmd >= SIOCIWFIRSTPRIV) ? \
- (cmd - SIOCIWFIRSTPRIV + 0x60) : \
- (cmd - SIOCSIWCOMMIT))
-#define IW_EVENT_CAPA_INDEX(cmd) (IW_EVENT_CAPA_BASE(cmd) >> 5)
-#define IW_EVENT_CAPA_MASK(cmd) (1 << (IW_EVENT_CAPA_BASE(cmd) & 0x1F))
-/* Event capability constants - event autogenerated by the kernel
- * This list is valid for most 802.11 devices, customise as needed... */
-#define IW_EVENT_CAPA_K_0 (IW_EVENT_CAPA_MASK(0x8B04) | \
- IW_EVENT_CAPA_MASK(0x8B06) | \
- IW_EVENT_CAPA_MASK(0x8B1A))
-#define IW_EVENT_CAPA_K_1 (IW_EVENT_CAPA_MASK(0x8B2A))
-/* "Easy" macro to set events in iw_range (less efficient) */
-#define IW_EVENT_CAPA_SET(event_capa, cmd) (event_capa[IW_EVENT_CAPA_INDEX(cmd)] |= IW_EVENT_CAPA_MASK(cmd))
-#define IW_EVENT_CAPA_SET_KERNEL(event_capa) {event_capa[0] |= IW_EVENT_CAPA_K_0; event_capa[1] |= IW_EVENT_CAPA_K_1; }
-
-/* Modulations bitmasks */
-#define IW_MODUL_ALL 0x00000000 /* Everything supported */
-#define IW_MODUL_FH 0x00000001 /* Frequency Hopping */
-#define IW_MODUL_DS 0x00000002 /* Original Direct Sequence */
-#define IW_MODUL_CCK 0x00000004 /* 802.11b : 5.5 + 11 Mb/s */
-#define IW_MODUL_11B (IW_MODUL_DS | IW_MODUL_CCK)
-#define IW_MODUL_PBCC 0x00000008 /* TI : 5.5 + 11 + 22 Mb/s */
-#define IW_MODUL_OFDM_A 0x00000010 /* 802.11a : 54 Mb/s */
-#define IW_MODUL_11A (IW_MODUL_OFDM_A)
-#define IW_MODUL_11AB (IW_MODUL_11B | IW_MODUL_11A)
-#define IW_MODUL_OFDM_G 0x00000020 /* 802.11g : 54 Mb/s */
-#define IW_MODUL_11G (IW_MODUL_11B | IW_MODUL_OFDM_G)
-#define IW_MODUL_11AG (IW_MODUL_11G | IW_MODUL_11A)
-#define IW_MODUL_TURBO 0x00000040 /* ATH : bonding, 108 Mb/s */
-/* In here we should define MIMO stuff. Later... */
-#define IW_MODUL_CUSTOM 0x40000000 /* Driver specific */
-
-/* Bitrate flags available */
-#define IW_BITRATE_TYPE 0x00FF /* Type of value */
-#define IW_BITRATE_UNICAST 0x0001 /* Maximum/Fixed unicast bitrate */
-#define IW_BITRATE_BROADCAST 0x0002 /* Fixed broadcast bitrate */
-
-/****************************** TYPES ******************************/
-
-/* --------------------------- SUBTYPES --------------------------- */
-/*
- * Generic format for most parameters that fit in an int
- */
-struct iw_param
-{
- int32_t value; /* The value of the parameter itself */
- uint8_t fixed; /* Hardware should not use auto select */
- uint8_t disabled; /* Disable the feature */
- uint16_t flags; /* Various specifc flags (if any) */
-};
-
-/*
- * For all data larger than 16 octets, we need to use a
- * pointer to memory allocated in user space.
- */
-struct iw_point
-{
- void *pointer; /* Pointer to the data (in user space) */
- uint16_t length; /* number of fields or size in bytes */
- uint16_t flags; /* Optional params */
-};
-
-/*
- * A frequency
- * For numbers lower than 10^9, we encode the number in 'm' and
- * set 'e' to 0
- * For number greater than 10^9, we divide it by the lowest power
- * of 10 to get 'm' lower than 10^9, with 'm'= f / (10^'e')...
- * The power of 10 is in 'e', the result of the division is in 'm'.
- */
-struct iw_freq
-{
- int32_t m; /* Mantissa */
- int16_t e; /* Exponent */
- uint8_t i; /* List index (when in range struct) */
- uint8_t flags; /* Flags (fixed/auto) */
-};
-
-/*
- * Quality of the link
- */
-struct iw_quality
-{
- uint8_t qual; /* link quality (%retries, SNR,
- %missed beacons or better...) */
- uint8_t level; /* signal level (dBm) */
- uint8_t noise; /* noise level (dBm) */
- uint8_t updated; /* Flags to know if updated */
-};
-
-/*
- * Packet discarded in the wireless adapter due to
- * "wireless" specific problems...
- * Note : the list of counter and statistics in net_device_stats
- * is already pretty exhaustive, and you should use that first.
- * This is only additional stats...
- */
-struct iw_discarded
-{
- uint32_t nwid; /* Rx : Wrong nwid/essid */
- uint32_t code; /* Rx : Unable to code/decode (WEP) */
- uint32_t fragment; /* Rx : Can't perform MAC reassembly */
- uint32_t retries; /* Tx : Max MAC retries num reached */
- uint32_t misc; /* Others cases */
-};
-
-/*
- * Packet/Time period missed in the wireless adapter due to
- * "wireless" specific problems...
- */
-struct iw_missed
-{
- uint32_t beacon; /* Missed beacons/superframe */
-};
-
-/*
- * Quality range (for spy threshold)
- */
-struct iw_thrspy
-{
- struct sockaddr addr; /* Source address (hw/mac) */
- struct iw_quality qual; /* Quality of the link */
- struct iw_quality low; /* Low threshold */
- struct iw_quality high; /* High threshold */
-};
-
-/*
- * Optional data for scan request
- *
- * Note: these optional parameters are controlling parameters for the
- * scanning behavior, these do not apply to getting scan results
- * (SIOCGIWSCAN). Drivers are expected to keep a local BSS table and
- * provide a merged results with all BSSes even if the previous scan
- * request limited scanning to a subset, e.g., by specifying an SSID.
- * Especially, scan results are required to include an entry for the
- * current BSS if the driver is in Managed mode and associated with an AP.
- */
-struct iw_scan_req
-{
- uint8_t scan_type; /* IW_SCAN_TYPE_{ACTIVE,PASSIVE} */
- uint8_t essid_len;
- uint8_t num_channels; /* num entries in channel_list;
- * 0 = scan all allowed channels */
- uint8_t flags; /* reserved as padding; use zero, this may
- * be used in the future for adding flags
- * to request different scan behavior */
- struct sockaddr bssid; /* ff:ff:ff:ff:ff:ff for broadcast BSSID or
- * individual address of a specific BSS */
-
- /*
- * Use this ESSID if IW_SCAN_THIS_ESSID flag is used instead of using
- * the current ESSID. This allows scan requests for specific ESSID
- * without having to change the current ESSID and potentially breaking
- * the current association.
- */
- uint8_t essid[IW_ESSID_MAX_SIZE];
-
- /*
- * Optional parameters for changing the default scanning behavior.
- * These are based on the MLME-SCAN.request from IEEE Std 802.11.
- * TU is 1.024 ms. If these are set to 0, driver is expected to use
- * reasonable default values. min_channel_time defines the time that
- * will be used to wait for the first reply on each channel. If no
- * replies are received, next channel will be scanned after this. If
- * replies are received, total time waited on the channel is defined by
- * max_channel_time.
- */
- uint32_t min_channel_time; /* in TU */
- uint32_t max_channel_time; /* in TU */
-
- struct iw_freq channel_list[IW_MAX_FREQUENCIES];
-};
-
-/* ------------------------- WPA SUPPORT ------------------------- */
-
-/*
- * Extended data structure for get/set encoding (this is used with
- * SIOCSIWENCODEEXT/SIOCGIWENCODEEXT. struct iw_point and IW_ENCODE_*
- * flags are used in the same way as with SIOCSIWENCODE/SIOCGIWENCODE and
- * only the data contents changes (key data -> this structure, including
- * key data).
- *
- * If the new key is the first group key, it will be set as the default
- * TX key. Otherwise, default TX key index is only changed if
- * IW_ENCODE_EXT_SET_TX_KEY flag is set.
- *
- * Key will be changed with SIOCSIWENCODEEXT in all cases except for
- * special "change TX key index" operation which is indicated by setting
- * key_len = 0 and ext_flags |= IW_ENCODE_EXT_SET_TX_KEY.
- *
- * tx_seq/rx_seq are only used when respective
- * IW_ENCODE_EXT_{TX,RX}_SEQ_VALID flag is set in ext_flags. Normal
- * TKIP/CCMP operation is to set RX seq with SIOCSIWENCODEEXT and start
- * TX seq from zero whenever key is changed. SIOCGIWENCODEEXT is normally
- * used only by an Authenticator (AP or an IBSS station) to get the
- * current TX sequence number. Using TX_SEQ_VALID for SIOCSIWENCODEEXT and
- * RX_SEQ_VALID for SIOCGIWENCODEEXT are optional, but can be useful for
- * debugging/testing.
- */
-struct iw_encode_ext
-{
- uint32_t ext_flags; /* IW_ENCODE_EXT_* */
- uint8_t tx_seq[IW_ENCODE_SEQ_MAX_SIZE]; /* LSB first */
- uint8_t rx_seq[IW_ENCODE_SEQ_MAX_SIZE]; /* LSB first */
- struct sockaddr addr; /* ff:ff:ff:ff:ff:ff for broadcast/multicast
- * (group) keys or unicast address for
- * individual keys */
- uint16_t alg; /* IW_ENCODE_ALG_* */
- uint16_t key_len;
- uint8_t key[0];
-};
-
-/* SIOCSIWMLME data */
-struct iw_mlme
-{
- uint16_t cmd; /* IW_MLME_* */
- uint16_t reason_code;
- struct sockaddr addr;
-};
-
-/* SIOCSIWPMKSA data */
-#define IW_PMKSA_ADD 1
-#define IW_PMKSA_REMOVE 2
-#define IW_PMKSA_FLUSH 3
-
-#define IW_PMKID_LEN 16
-
-struct iw_pmksa
-{
- uint32_t cmd; /* IW_PMKSA_* */
- struct sockaddr bssid;
- uint8_t pmkid[IW_PMKID_LEN];
-};
-
-/* IWEVMICHAELMICFAILURE data */
-struct iw_michaelmicfailure
-{
- uint32_t flags;
- struct sockaddr src_addr;
- uint8_t tsc[IW_ENCODE_SEQ_MAX_SIZE]; /* LSB first */
-};
-
-/* IWEVPMKIDCAND data */
-#define IW_PMKID_CAND_PREAUTH 0x00000001 /* RNS pre-authentication enabled */
-struct iw_pmkid_cand
-{
- uint32_t flags; /* IW_PMKID_CAND_* */
- uint32_t index; /* the smaller the index, the higher the
- * priority */
- struct sockaddr bssid;
-};
-
-/* ------------------------ WIRELESS STATS ------------------------ */
-/*
- * Wireless statistics (used for /proc/net/wireless)
- */
-struct iw_statistics
-{
- uint16_t status; /* Status
- * - device dependent for now */
-
- struct iw_quality qual; /* Quality of the link
- * (instant/mean/max) */
- struct iw_discarded discard; /* Packet discarded counts */
- struct iw_missed miss; /* Packet missed counts */
-};
-
-/* ------------------------ IOCTL REQUEST ------------------------ */
-/*
- * This structure defines the payload of an ioctl, and is used
- * below.
- *
- * Note that this structure should fit on the memory footprint
- * of iwreq (which is the same as ifreq), which mean a max size of
- * 16 octets = 128 bits. Warning, pointers might be 64 bits wide...
- * You should check this when increasing the structures defined
- * above in this file...
- */
-union iwreq_data
-{
- /* Config - generic */
- char name[16];
- /* Name : used to verify the presence of wireless extensions.
- * Name of the protocol/provider... */
-
- struct iw_point essid; /* Extended network name */
- struct iw_param nwid; /* network id (or domain - the cell) */
- struct iw_freq freq; /* frequency or channel :
- * 0-1000 = channel
- * > 1000 = frequency in Hz */
-
- struct iw_param sens; /* signal level threshold */
- struct iw_param bitrate; /* default bit rate */
- struct iw_param txpower; /* default transmit power */
- struct iw_param rts; /* RTS threshold threshold */
- struct iw_param frag; /* Fragmentation threshold */
- uint32_t mode; /* Operation mode */
- struct iw_param retry; /* Retry limits & lifetime */
-
- struct iw_point encoding; /* Encoding stuff : tokens */
- struct iw_param power; /* PM duration/timeout */
- struct iw_quality qual; /* Quality part of statistics */
-
- struct sockaddr ap_addr; /* Access point address */
- struct sockaddr addr; /* Destination address (hw/mac) */
-
- struct iw_param param; /* Other small parameters */
- struct iw_point data; /* Other large parameters */
-};
-
-/*
- * The structure to exchange data for ioctl.
- * This structure is the same as 'struct ifreq', but (re)defined for
- * convenience...
- * Do I need to remind you about structure size (32 octets) ?
- */
-struct iwreq
-{
- union
- {
- char ifrn_name[16]; /* if name, e.g. "eth0" */
- } ifr_ifrn;
-
- /* Data part (defined just above) */
- union iwreq_data u;
-};
-
-/* -------------------------- IOCTL DATA -------------------------- */
-/*
- * For those ioctl which want to exchange mode data that what could
- * fit in the above structure...
- */
-
-/*
- * Range of parameters
- */
-
-struct iw_range
-{
- /* Informative stuff (to choose between different interface) */
- uint32_t throughput; /* To give an idea... */
- /* In theory this value should be the maximum benchmarked
- * TCP/IP throughput, because with most of these devices the
- * bit rate is meaningless (overhead an co) to estimate how
- * fast the connection will go and pick the fastest one.
- * I suggest people to play with Netperf or any benchmark...
- */
-
- /* NWID (or domain id) */
- uint32_t min_nwid; /* Minimal NWID we are able to set */
- uint32_t max_nwid; /* Maximal NWID we are able to set */
-
- /* Old Frequency (backward compat - moved lower ) */
- uint16_t old_num_channels;
- uint8_t old_num_frequency;
-
- /* Wireless event capability bitmasks */
- uint32_t event_capa[6];
-
- /* signal level threshold range */
- int32_t sensitivity;
-
- /* Quality of link & SNR stuff */
- /* Quality range (link, level, noise)
- * If the quality is absolute, it will be in the range [0 ; max_qual],
- * if the quality is dBm, it will be in the range [max_qual ; 0].
- * Don't forget that we use 8 bit arithmetics... */
- struct iw_quality max_qual; /* Quality of the link */
- /* This should contain the average/typical values of the quality
- * indicator. This should be the threshold between a "good" and
- * a "bad" link (example : monitor going from green to orange).
- * Currently, user space apps like quality monitors don't have any
- * way to calibrate the measurement. With this, they can split
- * the range between 0 and max_qual in different quality level
- * (using a geometric subdivision centered on the average).
- * I expect that people doing the user space apps will feedback
- * us on which value we need to put in each driver... */
- struct iw_quality avg_qual; /* Quality of the link */
-
- /* Rates */
- uint8_t num_bitrates; /* Number of entries in the list */
- int32_t bitrate[IW_MAX_BITRATES]; /* list, in bps */
-
- /* RTS threshold */
- int32_t min_rts; /* Minimal RTS threshold */
- int32_t max_rts; /* Maximal RTS threshold */
-
- /* Frag threshold */
- int32_t min_frag; /* Minimal frag threshold */
- int32_t max_frag; /* Maximal frag threshold */
-
- /* Power Management duration & timeout */
- int32_t min_pmp; /* Minimal PM period */
- int32_t max_pmp; /* Maximal PM period */
- int32_t min_pmt; /* Minimal PM timeout */
- int32_t max_pmt; /* Maximal PM timeout */
- uint16_t pmp_flags; /* How to decode max/min PM period */
- uint16_t pmt_flags; /* How to decode max/min PM timeout */
- uint16_t pm_capa; /* What PM options are supported */
-
- /* Encoder stuff */
- uint16_t encoding_size[IW_MAX_ENCODING_SIZES]; /* Different token sizes */
- uint8_t num_encoding_sizes; /* Number of entry in the list */
- uint8_t max_encoding_tokens; /* Max number of tokens */
- /* For drivers that need a "login/passwd" form */
- uint8_t encoding_login_index; /* token index for login token */
-
- /* Transmit power */
- uint16_t txpower_capa; /* What options are supported */
- uint8_t num_txpower; /* Number of entries in the list */
- int32_t txpower[IW_MAX_TXPOWER]; /* list, in bps */
-
- /* Wireless Extension version info */
- uint8_t we_version_compiled; /* Must be WIRELESS_EXT */
- uint8_t we_version_source; /* Last update of source */
-
- /* Retry limits and lifetime */
- uint16_t retry_capa; /* What retry options are supported */
- uint16_t retry_flags; /* How to decode max/min retry limit */
- uint16_t r_time_flags; /* How to decode max/min retry life */
- int32_t min_retry; /* Minimal number of retries */
- int32_t max_retry; /* Maximal number of retries */
- int32_t min_r_time; /* Minimal retry lifetime */
- int32_t max_r_time; /* Maximal retry lifetime */
-
- /* Frequency */
- uint16_t num_channels; /* Number of channels [0; num - 1] */
- uint8_t num_frequency; /* Number of entry in the list */
- struct iw_freq freq[IW_MAX_FREQUENCIES]; /* list */
- /* Note : this frequency list doesn't need to fit channel numbers,
- * because each entry contain its channel index */
-
- uint32_t enc_capa; /* IW_ENC_CAPA_* bit field */
-
- /* More power management stuff */
- int32_t min_pms; /* Minimal PM saving */
- int32_t max_pms; /* Maximal PM saving */
- uint16_t pms_flags; /* How to decode max/min PM saving */
-
- /* All available modulations for driver (hw may support less) */
- int32_t modul_capa; /* IW_MODUL_* bit field */
-
- /* More bitrate stuff */
- uint32_t bitrate_capa; /* Types of bitrates supported */
-};
-
-/*
- * Private ioctl interface information
- */
-
-struct iw_priv_args
-{
- uint32_t cmd; /* Number of the ioctl to issue */
- uint16_t set_args; /* Type and number of args */
- uint16_t get_args; /* Type and number of args */
- char name[16]; /* Name of the extension */
-};
-
-/* ----------------------- WIRELESS EVENTS ----------------------- */
-/*
- * Wireless events are carried through the rtnetlink socket to user
- * space. They are encapsulated in the IFLA_WIRELESS field of
- * a RTM_NEWLINK message.
- */
-
-/*
- * A Wireless Event. Contains basically the same data as the ioctl...
- */
-struct iw_event
-{
- uint16_t len; /* Real lenght of this stuff */
- uint16_t cmd; /* Wireless IOCTL */
- union iwreq_data u; /* IOCTL fixed payload */
-};
-
-/* Size of the Event prefix (including padding and alignement junk) */
-#define IW_EV_LCP_LEN (sizeof(struct iw_event) - sizeof(union iwreq_data))
-/* Size of the various events */
-#define IW_EV_CHAR_LEN (IW_EV_LCP_LEN + IFNAMSIZ)
-#define IW_EV_UINT_LEN (IW_EV_LCP_LEN + sizeof(uint32_t))
-#define IW_EV_FREQ_LEN (IW_EV_LCP_LEN + sizeof(struct iw_freq))
-#define IW_EV_PARAM_LEN (IW_EV_LCP_LEN + sizeof(struct iw_param))
-#define IW_EV_ADDR_LEN (IW_EV_LCP_LEN + sizeof(struct sockaddr))
-#define IW_EV_QUAL_LEN (IW_EV_LCP_LEN + sizeof(struct iw_quality))
-
-/* iw_point events are special. First, the payload (extra data) come at
- * the end of the event, so they are bigger than IW_EV_POINT_LEN. Second,
- * we omit the pointer, so start at an offset. */
-#define IW_EV_POINT_OFF (((char *) &(((struct iw_point *) NULL)->length)) - \
- (char *) NULL)
-#define IW_EV_POINT_LEN (IW_EV_LCP_LEN + sizeof(struct iw_point) - \
- IW_EV_POINT_OFF)
-
-/* Size of the Event prefix when packed in stream */
-#define IW_EV_LCP_PK_LEN (4)
-/* Size of the various events when packed in stream */
-#define IW_EV_CHAR_PK_LEN (IW_EV_LCP_PK_LEN + IFNAMSIZ)
-#define IW_EV_UINT_PK_LEN (IW_EV_LCP_PK_LEN + sizeof(uint32_t))
-#define IW_EV_FREQ_PK_LEN (IW_EV_LCP_PK_LEN + sizeof(struct iw_freq))
-#define IW_EV_PARAM_PK_LEN (IW_EV_LCP_PK_LEN + sizeof(struct iw_param))
-#define IW_EV_ADDR_PK_LEN (IW_EV_LCP_PK_LEN + sizeof(struct sockaddr))
-#define IW_EV_QUAL_PK_LEN (IW_EV_LCP_PK_LEN + sizeof(struct iw_quality))
-#define IW_EV_POINT_PK_LEN (IW_EV_LCP_LEN + 4)
-
-#endif /* _LINUX_WIRELESS_H */
diff --git a/contrib/package/meshwizard/Makefile b/contrib/package/meshwizard/Makefile
deleted file mode 100644
index 62983465c..000000000
--- a/contrib/package/meshwizard/Makefile
+++ /dev/null
@@ -1,39 +0,0 @@
-# Copyright (C) 2011 Manuel Munz <freifunk at somakoma de>
-# This is free software, licensed under the Apache 2.0 license.
-
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=meshwizard
-PKG_RELEASE:=0.3.3
-
-PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
-
-include $(INCLUDE_DIR)/package.mk
-
-define Package/meshwizard
- SECTION:=luci
- CATEGORY:=LuCI
- SUBMENU:=9. Freifunk
- TITLE:=Shell script based wizard for Mesh networks
- DEPENDS:=+firewall
-endef
-
-define Package/meshwizard/description
- A shellscript based wizard to simplify the setup of a typical mesh node (e.g. for Freifunk.net)
-endef
-
-define Build/Prepare
- mkdir -p $(PKG_BUILD_DIR)
-endef
-
-define Build/Configure
-endef
-
-define Build/Compile
-endef
-
-define Package/meshwizard/install
- $(CP) ./files/* $(1)/
-endef
-
-$(eval $(call BuildPackage,meshwizard))
diff --git a/contrib/package/meshwizard/files/etc/config/meshwizard b/contrib/package/meshwizard/files/etc/config/meshwizard
deleted file mode 100644
index a60b0cc44..000000000
--- a/contrib/package/meshwizard/files/etc/config/meshwizard
+++ /dev/null
@@ -1,7 +0,0 @@
-config 'netconfig' 'netconfig'
-
-config 'general' 'general'
- option 'sharenet' '0'
- option 'local_restrict' '1'
- option 'cleanup' '1'
-
diff --git a/contrib/package/meshwizard/files/usr/bin/meshwizard/functions.sh b/contrib/package/meshwizard/files/usr/bin/meshwizard/functions.sh
deleted file mode 100644
index 0b99530a5..000000000
--- a/contrib/package/meshwizard/files/usr/bin/meshwizard/functions.sh
+++ /dev/null
@@ -1,118 +0,0 @@
-uci_remove_list_element() {
- local option="$1"
- local value="$2"
- local list="$(uci get $option)"
- local elem
-
- uci delete $option
- for elem in $list; do
- if [ "$elem" != "$value" ]; then
- uci add_list $option=$elem
- fi
- done
-}
-
-# string_contains(string, substring)
-#
-# Returns 0 if the specified string contains the specified substring,
-# otherwise returns 1.
-string_contains() {
- string="$1"
- substring="$2"
- if test "${string#*$substring}" != "$string"
- then
- return 0 # $substring is in $string
- else
- return 1 # $substring is not in $string
- fi
-}
-
-# Takes 2 arguments
-# $1 = text to be displayed in the output for this section
-# $2 = section (optional)
-uci_commitverbose() {
- echo "+ $1"
- uci changes $2 | while read line; do
- echo " $line"
- done
- uci commit $2
-}
-
-set_defaults() {
- for def in $(env |grep "^$1" | sed 's/ /_/g'); do
- option="${def/$1/}"
- a="$(echo $option |cut -d '=' -f1)"
- b="$(echo $option |cut -d '=' -f2-)"
- b="${b//_/ }"
- string_contains "$a" "_LENGTH" && continue
- string_contains "$a" "_ITEM" && {
- # special treatment for lists. use add_list and remove the
- # item index (_ITEMx).
- uci add_list $2.${a//_ITEM[0-9]*/}="$b"
- } || {
- uci set $2.$a="$b"
- }
- done
-}
-
-# 3 arguments: 1=config name 2=oldname 3=newname
-section_rename() {
- uci -q rename $1.$2=$3 && msg_rename $1.$2 $1.$3 || msg_rename_error $1.$2 $1.$3
-}
-
-msg_missing_value() {
- echo -e " \033[1mWarning:\033[0m Configuration option for $2 is missing in $1."
-}
-
-msg_success() {
- echo " Finished."
-}
-
-msg_error() {
- echo " \033[1mError: \033[0mThere was a problem."
-}
-
-msg_rename() {
- echo " Renamed unnamed section $1 to $2."
-}
-
-msg_rename_error() {
- echo " \033[1mWarning:\033[0m Could not rename $1 to $2."
-}
-
-
-restore_factory_defaults() {
- echo "+ Restore default config as requested with cleanup=1"
- cp -f /rom/etc/config/* /etc/config/
- rm /etc/config/wireless
- wifi detect > /etc/config/wireless
- rm /etc/config/network
- if [ -f /etc/init.d/defconfig ]; then
- # legacy (AA)
- /etc/init.d/defconfig start
- [ -f /rom/etc/uci-defaults/network ] && sh /rom/etc/uci-defaults/network
- else
- sh /rom/etc/uci-defaults/02_network
- fi
-}
-
-is_in_list() {
- # checks if an item is in a list
- local list="$1"
- local item="$2"
- for word in $list; do
- [ $word = "$item" ] && return 0
- done
- return 1
-}
-
-add_to_list() {
- local list="$1"
- local item="$2"
- is_in_list "$list" "$item" && echo $list
- if [ -z "$list" ]; then
- echo "$item"
- else
- echo "$list $item"
- fi
-}
diff --git a/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/check-range-in-range.sh b/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/check-range-in-range.sh
deleted file mode 100755
index c889c55ed..000000000
--- a/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/check-range-in-range.sh
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/bin/sh
-# Checks whether a netrange is inside another netrange, returns 1 if true
-# Takes two arguments: $1: net from which we want to know if it is inside $2
-# nets need to be given in CIDR notation
-
-dir=$(dirname $0)
-
-awk -f $dir/common.awk -f - $* <<EOF
-BEGIN {
-
- slpos=index(ARGV[1],"/")
- ipaddr=ip2int(substr(ARGV[1],0,slpos-1))
- netmask=compl(2**(32-int(substr(ARGV[1],slpos+1)))-1)
- network=and(ipaddr,netmask)
- broadcast=or(network,compl(netmask))
-
- slpos2=index(ARGV[2],"/")
- ipaddr2=ip2int(substr(ARGV[2],0,slpos2-1))
- netmask2=compl(2**(32-int(substr(ARGV[2],slpos2+1)))-1)
- network2=and(ipaddr2,netmask2)
- broadcast2=or(network2,compl(netmask2))
-
- if (network >= network2) {
- if (network <= broadcast2) {
- if (broadcast <= broadcast2) {
- print "1"
- }
- }
- }
-}
-EOF
diff --git a/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/common.awk b/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/common.awk
deleted file mode 100644
index 5b03d06be..000000000
--- a/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/common.awk
+++ /dev/null
@@ -1,20 +0,0 @@
-function bitcount(c) {
- c=and(rshift(c, 1),0x55555555)+and(c,0x55555555)
- c=and(rshift(c, 2),0x33333333)+and(c,0x33333333)
- c=and(rshift(c, 4),0x0f0f0f0f)+and(c,0x0f0f0f0f)
- c=and(rshift(c, 8),0x00ff00ff)+and(c,0x00ff00ff)
- c=and(rshift(c,16),0x0000ffff)+and(c,0x0000ffff)
- return c
-}
-
-function ip2int(ip) {
- for (ret=0,n=split(ip,a,"\."),x=1;x<=n;x++) ret=or(lshift(ret,8),a[x])
- return ret
-}
-
-function int2ip(ip,ret,x) {
- ret=and(ip,255)
- ip=rshift(ip,8)
- for(;x<3;ret=and(ip,255)"."ret,ip=rshift(ip,8),x++);
- return ret
-}
diff --git a/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/gen_auto-ipv6-dhcpv6-ip.sh b/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/gen_auto-ipv6-dhcpv6-ip.sh
deleted file mode 100755
index 9eca11b41..000000000
--- a/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/gen_auto-ipv6-dhcpv6-ip.sh
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/sh
-netrenamed=$1
-
-PREFIX="$(echo $ipv6_prefix| cut -d "/" -f 1| sed 's/::/:/')"
-
-# Get the devices mac address
-device="$(uci -p/var/state -q get network.$1.ifname)"
-if [ -n "$device" ]; then
- MAC="$(ifconfig $netrenamed |grep HWaddr | awk '{ print $5 '})"
-else
- MAC="$(cat /sys/class/net/$1/address)"
- IPV6_UNIQ="$(echo $MAC | awk -F: '{ print $1$2":"$3$4":"$5$6 }')"
-fi
-
-echo "${PREFIX}${IPV6_UNIQ}:1"
-
diff --git a/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/gen_bssid.sh b/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/gen_bssid.sh
deleted file mode 100755
index efe101fad..000000000
--- a/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/gen_bssid.sh
+++ /dev/null
@@ -1,36 +0,0 @@
-#!/bin/sh
-# create essid from channel, takes two args:
-# $1 = channel (integer)
-# $2 = community (optional)
-channel=$1
-community=$2
-
-. /lib/functions.sh
-
-
-# Try to get BSSID from profile first
-config_load profile_$community
-config_get bssid bssidscheme $channel
-if [ -z "$bssid" ]; then
- config_get bssid bssidscheme "all"
-fi
-
-if [ -z "$bssid" ]; then
- case $channel in
- [1-9])
- bssid="$(printf "%X\n" $channel)2:CA:FF:EE:BA:BE"
- ;;
- 1[0-4])
- bssid="$(printf "%X\n" $channel)2:CA:FF:EE:BA:BE"
- ;;
- [3-9][0-9])
- bssid="02:$channel:CA:FF:EE:EE"
- ;;
- 1[0-9][0-9])
- bssid="${channel/1/12:}:CA:FF:EE:EE"
- ;;
- *) bssid="02:CA:FF:EE:BA:BE"
- ;;
- esac
-fi
-echo $bssid
diff --git a/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/gen_dhcp_ip.sh b/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/gen_dhcp_ip.sh
deleted file mode 100755
index e559166f4..000000000
--- a/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/gen_dhcp_ip.sh
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-# generates a dhcp-ip and netrange from a given ip/subnet
-# takes 2 arguments:
-# $1: Ip Address (of the Interface for which we want to generate an ip)
-
-echo "$1" | awk 'BEGIN { FS = "." } ; { print "6."$3"."$4".1" }'
diff --git a/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/initial_config.sh b/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/initial_config.sh
deleted file mode 100755
index c1e55224e..000000000
--- a/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/initial_config.sh
+++ /dev/null
@@ -1,42 +0,0 @@
-#!/bin/sh
-# This is only run once (usually after flashing an image from the imagebuilder)
-# It sets up the initial config for this node.
-
-. /lib/functions.sh
-. $dir/functions.sh
-
-config_load system
-
-# Rename system config
-handle_system() {
- if [ -z "${1/cfg[0-9a-fA-F]*/}" ]; then
- section_rename system $1 system
- fi
-}
-config_foreach handle_system system
-
-if [ -n "$(uci -q get meshwizard.community)" ]; then
- set_defaults "community_" freifunk.community
- uci -q delete meshwizard.community
-fi
-
-[ -n "$profile_homepage" ] && uci set freifunk.community.homepage="$profile_homepage"
-
-[ -n "$profile_mapserver" ] && {
- uci -q delete freifunk.community.mapserver
- for m in $profile_mapserver; do
- uci add_list freifunk.community.mapserver="$m"
- done
-}
-
-uci_commitverbose "Setup community" freifunk
-
-if [ -n "$(uci -q get meshwizard.contact)" ]; then
- set_defaults "contact_" freifunk.contact
- uci -q delete meshwizard.contact && uci_commitverbose "Setup contact" freifunk
-fi
-
-if [ "$has_luci" == TRUE ]; then
- set_defaults "luci_main_" luci.main
- uci -q delete meshwizard.luci_main && uci_commitverbose "Setup luci" luci
-fi
diff --git a/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/ipcalc-cidr.sh b/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/ipcalc-cidr.sh
deleted file mode 100755
index 6d7a1fb56..000000000
--- a/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/ipcalc-cidr.sh
+++ /dev/null
@@ -1,42 +0,0 @@
-#!/bin/sh
-dir=$(dirname $0)
-awk -f $dir/common.awk -f - $* <<EOF
-BEGIN {
- slpos=index(ARGV[1],"/")
- if (slpos == 0) {
- ipaddr=ip2int(ARGV[1])
- netmask=ip2int(ARGV[2])
- } else {
- ipaddr=ip2int(substr(ARGV[1],0,slpos-1))
- netmask=compl(2**(32-int(substr(ARGV[1],slpos+1)))-1)
- ARGV[4]=ARGV[3]
- ARGV[3]=ARGV[2]
- }
-
- network=and(ipaddr,netmask)
- broadcast=or(network,compl(netmask))
-
- start=or(network,and(ip2int(ARGV[3]),compl(netmask)))
- limit=network+1
- if (start<limit) start=limit
-
- end=start+ARGV[4]
- limit=or(network,compl(netmask))-1
- if (end>limit) end=limit
-
- print "IP="int2ip(ipaddr)
- print "NETMASK="int2ip(netmask)
- print "BROADCAST="int2ip(broadcast)
- print "NETWORK="int2ip(network)
- print "NEXTNET="int2ip(broadcast + 1)
- print "PREFIX="32-bitcount(compl(netmask))
-
- # range calculations:
- # ipcalc <ip> <netmask> <start> <num>
-
- if (ARGC > 3) {
- print "START="int2ip(start)
- print "END="int2ip(end)
- }
-}
-EOF
diff --git a/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/read_defaults.sh b/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/read_defaults.sh
deleted file mode 100755
index b6ffb62e4..000000000
--- a/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/read_defaults.sh
+++ /dev/null
@@ -1,61 +0,0 @@
-#!/bin/sh
-# These functions read the settings we need for configuration of the router
-
-read_defaults() {
- # read default values from the 3 relevant config files and export them
- # into the environment. Later loaded configs overwrite earlier ones. The
- # The ordering here is from most generic to most specific:
- # freifunk (most generic defaults)
- # profile_* (community defaults)
- # nodes custom config from meshwizard config file
-
- local community="$1"
-
- config_cb() {
- local type="$1"
- local name="$2"
- local allowed_section_types="widget"
- local allowed_section_names="
- system
- wifi_device
- wifi_iface
- interface
- alias
- dhcp
- olsr_interface
- olsr_interfacedefaults
- profile
- zone_freifunk
- include
- luci_splash
- ipv6
- luci_main
- contact
- community
- wan
- lan
- general
- ipv6
- qos
- "
-
- if [ "$type" = "widget" ]; then
- widgets=$(add_to_list "$widgets" "$name")
- fi
-
- if ([ -n "$name" ] && is_in_list "$allowed_section_names" $name) \
- || is_in_list "$allowed_section_types" $type ; then
- option_cb() {
- local option="$1"
- local value="$2"
- export "${CONFIG_SECTION}_${option}"="$value"
- }
- else
- option_cb() { return; }
- fi
- }
- config_load freifunk
- config_load profile_${community}
- config_load meshwizard
- export widgets="$widgets"
-}
diff --git a/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/rename-wifi.sh b/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/rename-wifi.sh
deleted file mode 100755
index f2d10cc9e..000000000
--- a/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/rename-wifi.sh
+++ /dev/null
@@ -1,46 +0,0 @@
-#!/bin/sh
-# This script renames IB_wifi_ interface names into real interface names used on this system.
-# E.g. wireless.IB_wifi0 would become wireless.radio0 on mac80211
-
-. $dir/functions.sh
-
-posIB=-1
-
-IBwifis="$(uci show meshwizard.netconfig | grep 'IB_' | sed 's/meshwizard.netconfig\.\(IB_wifi.*\)_.*/\1/' |uniq)"
-[ -z "$(echo $IBwifis |grep IB_wifi)" ] && exit
-
-for w in $IBwifis; do
- posIB=$(( $posIB + 1 ))
- export IB_wifi$posIB="$w"
-done
-
-pos=0
-syswifis="$(uci show wireless |grep wifi-device | sed 's/wireless\.\(.*\)=.*/\1/' |uniq)"
-
-for s in $syswifis; do
- export syswifi$pos="$s"
- pos=$(( $pos + 1 ))
-done
-
-for i in `seq 0 $posIB`; do
- IBwifi=$(eval echo \$IB_wifi$i)
- syswifi=$(eval echo \$syswifi$i)
-
- if [ -n "$syswifi" ]; then
- case $IBwifi in
- IB_wifi* )
- # replace IB_wifi_* with actual wifi interface names, delete old ones first
- uci show meshwizard.netconfig | grep $IBwifi | while read line; do
- oldline=$(echo $line | cut -d "=" -f 1)
- uci set $oldline=""
- newline=$(echo $line |sed -e "s/$IBwifi/$syswifi/g" -e "s/'//g")
- uci set $newline
- done
- ;;
- esac
- unset IBwifi
- unset syswifi
- fi
-done
-
-uci_commitverbose "Renaming wifi-devices in /etc/config/meshwizard" meshwizard
diff --git a/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_auto-ipv6-interface.sh b/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_auto-ipv6-interface.sh
deleted file mode 100755
index adf342913..000000000
--- a/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_auto-ipv6-interface.sh
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/bin/sh
-
-net=$1
-. $dir/functions.sh
-
-ra="$(uci -q get meshwizard.netconfig.${net}_ipv6ra)"
-uci set autoipv6.${netrenamed}="interface"
-if [ -n "$ra" ]; then
- uci set autoipv6.${netrenamed}.ra=1
-fi
-
-uci_commitverbose "Setup auto-ipv6 for interface $netrenamed" autoipv6
diff --git a/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_auto-ipv6.sh b/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_auto-ipv6.sh
deleted file mode 100755
index 8e3f015cd..000000000
--- a/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_auto-ipv6.sh
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/bin/sh
-
-. $dir/functions.sh
-
-if [ "$ipv6_config" = "auto-ipv6-fromv4" ]; then
- mode="fromv4"
-else
- mode="random"
-fi
-
-uci set autoipv6.olsr_node.enabled=1
-uci set autoipv6.olsr_node.mode="$mode"
-uci_commitverbose "Setup auto-ipv6" autoipv6
-
-uci set network.wan.accept_ra=0
-uci_commitverbose "Do not accept ra's on wan when using auto-ipv6" network
-
diff --git a/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_dhcp.sh b/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_dhcp.sh
deleted file mode 100755
index 8cce8319a..000000000
--- a/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_dhcp.sh
+++ /dev/null
@@ -1,46 +0,0 @@
-#!/bin/sh
-# Sets up the dhcp part of dnsmasq
-
-. /lib/functions.sh
-. $dir/functions.sh
-
-net="$1"
-vap="$(uci -q get meshwizard.netconfig.${net}_vap)"
-
-handle_dnsmasq() {
- config_get interface "$1" interface
- if [ "$interface" == "${netrenamed}dhcp" ]; then
- if [ -z "${1/cfg[0-9a-fA-F]*/}" ]; then
- section_rename dhcp $1 ${netrenamed}dhcp
- fi
- fi
-}
-config_load dhcp
-config_foreach handle_dnsmasq dhcp
-
-[ "$net" == "lan" ] && uci -q delete dhcp.lan
-
-if [ "$supports_vap" = 1 -a "$vap" = 1 ]; then
- uci batch <<- EOF
- set dhcp.${netrenamed}dhcp="dhcp"
- set dhcp.${netrenamed}dhcp.ignore="0"
- set dhcp.${netrenamed}dhcp.interface="${netrenamed}dhcp"
- EOF
- set_defaults "dhcp_" dhcp.${netrenamed}dhcp
-fi
-
-ahdhcp_when_vap="$(uci get profile_$community.profile.adhoc_dhcp_when_vap)"
-if [ "$supports_vap" = 0 ] || \
- [ "$supports_vap" = 1 -a "$vap" = 1 -a "$ahdhcp_when_vap" = 1 ] || \
- [ "$lan_is_olsr" = "1" -a "$lan_dhcp" = 1 ]; then
- uci batch <<- EOF
- set dhcp.${netrenamed}ahdhcp="dhcp"
- set dhcp.${netrenamed}ahdhcp.ignore="0"
- set dhcp.${netrenamed}ahdhcp.interface="${netrenamed}ahdhcp"
- EOF
-fi
-set_defaults "dhcp_" dhcp.${netrenamed}ahdhcp
-
-uci_commitverbose "Setup DHCP for $netrenamed" dhcp
-
-
diff --git a/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_dnsmasq.sh b/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_dnsmasq.sh
deleted file mode 100755
index 9297f9175..000000000
--- a/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_dnsmasq.sh
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/bin/sh
-
-. /lib/functions.sh
-. $dir/functions.sh
-
-# Set dnsmasq config
-handle_dhcp() {
- if [ -z "${1/cfg[0-9a-fA-F]*/}" ]; then
- section_rename dhcp $1 dnsmasq
- fi
-}
-
-config_load dhcp
-config_foreach handle_dhcp dnsmasq
-
-uci batch << EOF
- set dhcp.dnsmasq.local="/$profile_suffix/"
- set dhcp.dnsmasq.domain="$profile_suffix"
-EOF
-
-config_get addnhosts dnsmasq addnhosts
-if [ -z "${addnhosts/\var\/etc\/hosts.olsr/}" ]; then
- uci add_list dhcp.dnsmasq.addnhosts="/var/etc/hosts.olsr"
- if [ "$ipv6_enabled" = 1 ]; then
- uci add_list dhcp.dnsmasq.addnhosts="/var/etc/hosts.olsr.ipv6"
- fi
-fi
-
-uci_commitverbose "Setup dnsmasq" dhcp
diff --git a/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_firewall.sh b/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_firewall.sh
deleted file mode 100755
index 154b2b691..000000000
--- a/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_firewall.sh
+++ /dev/null
@@ -1,145 +0,0 @@
-#!/bin/sh
-# Add "freifunk" firewall zone
-# If wan/lan is used for olsr then remove these networks from wan/lan zones
-# Also setup rules defined in /etc/config/freifunk and /etc/config/profile_<community>
-
-. /lib/functions.sh
-. $dir/functions.sh
-
-wan_is_olsr=$(uci -q get meshwizard.netconfig.wan_config)
-
-config_load firewall
-
-# Rename firewall zone for freifunk if unnamed
-# If wan is used for olsr then set network for the firewall zone wan to ' ' to remove the wan interface from it, else add local restrict to it
-# If lan is used for olsr then set network for the firewall zone lan to ' ' to remove the lan interface from it
-
-handle_fwzone() {
- config_get name "$1" name
- config_get network "$1" network
-
- if [ "$name" == "freifunk" ]; then
- # rename section if unnamed
- if [ -z "${1/cfg[0-9a-fA-F]*/}" ]; then
- section_rename firewall $1 zone_freifunk
- fi
- fi
-
- if [ "$name" == "wan" ]; then
- if [ "$wan_is_olsr" == 1 ]; then
- uci set firewall.$1.network=' ' && uci_commitverbose "WAN is used for olsr, removed the wan interface from zone wan" firewall
- else
- uci set firewall.$1.local_restrict=1 && uci_commitverbose "Enable local_restrict for zone wan" firewall
- fi
- fi
-
- if [ "$name" == "lan" ] && [ "$lan_is_olsr" == "1" ]; then
- uci set firewall.$1.network=' ' && uci_commitverbose "LAN is used for olsr, removed the lan interface from zone lan" firewall
- fi
-}
-
-config_foreach handle_fwzone zone
-
-uci batch << EOF
- set firewall.zone_freifunk="zone"
- set firewall.zone_freifunk.name="freifunk"
- set firewall.zone_freifunk.input="$zone_freifunk_input"
- set firewall.zone_freifunk.forward="$zone_freifunk_forward"
- set firewall.zone_freifunk.output="$zone_freifunk_output"
-EOF
-
-uci_commitverbose "Setup firewall zones" firewall
-
-# Usually we need to setup masquerading for lan, except lan is an olsr interface or has an olsr hna-entry
-
-handle_interface() {
- config_get interface "$1" interface
- if [ "$interface" == "lan" ]; then
- no_masq_lan=1
- fi
-}
-config_load olsrd
-config_foreach handle_interface Interface
-
-LANIP="$(uci -q get network.lan.ipaddr)"
-if [ -n "$LANIP" ]; then
- handle_hna() {
- config_get netaddr "$1" netaddr
- if [ "$LANIP" == "$netaddr" ]; then
- no_masq_lan=1
- fi
- }
- config_foreach handle_hna Hna4
-fi
-
-currms=$(uci -q get firewall.zone_freifunk.masq_src)
-if [ ! "$no_masq_lan" == "1" ] && [ ! "$(uci -q get meshwizard.netconfig.lan_config)" == 1 ]; then
- uci set firewall.zone_freifunk.masq="1"
- [ -z "$(echo $currms |grep lan)" ] && uci add_list firewall.zone_freifunk.masq_src="lan"
-fi
-
-
-# Rules, Forwardings, advanced config and includes from freifunk and
-# profile_$community config files.
-
-add_fw_rules() {
- config_cb() {
- local type="$1"
- local name="$2"
- local allowed_section_types="advanced include fw_rule fw_forwarding"
- if is_in_list "$allowed_section_types" $type ; then
- uci set firewall.${name}="${type/fw_/}"
- option_cb() {
- local option="$1"
- local value="$2"
- uci set firewall.${CONFIG_SECTION}.${option}="$value"
- }
- else
- option_cb() { return; }
- fi
- }
- config_load freifunk
- config_load profile_${community}
-}
-add_fw_rules
-
-
-# If we use auto-ipv6-dhcp then allow 547/udp on the freifunk zone
-if [ "$ipv6_config" = "auto-ipv6-dhcpv6" ]; then
- uci batch <<- EOF
- set firewall.dhcpv6=rule
- set firewall.dhcpv6.src=freifunk
- set firewall.dhcpv6.target=ACCEPT
- set firewall.dhcpv6.dest_port=547
- set firewall.dhcpv6.proto=udp
- EOF
-fi
-
-# Firewall rules to allow incoming ssh and web if enabled
-
-if [ "$wan_allowssh" == 1 ]; then
- uci batch <<- EOF
- set firewall.wanssh=rule
- set firewall.wanssh.src=wan
- set firewall.wanssh.target=ACCEPT
- set firewall.wanssh.proto=tcp
- set firewall.wanssh.dest_port=22
- EOF
-fi
-
-if [ "$wan_allowweb" == 1 ]; then
- uci batch <<- EOF
- set firewall.wanweb=rule
- set firewall.wanweb.src=wan
- set firewall.wanweb.target=ACCEPT
- set firewall.wanweb.proto=tcp
- set firewall.wanweb.dest_port=80
- set firewall.wanwebhttps=rule
- set firewall.wanwebhttps.src=wan
- set firewall.wanwebhttps.target=ACCEPT
- set firewall.wanwebhttps.proto=tcp
- set firewall.wanwebhttps.dest_port=443
- EOF
-fi
-
-uci_commitverbose "Setup rules, forwardings, advanced config and includes." firewall
diff --git a/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_firewall_interface.sh b/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_firewall_interface.sh
deleted file mode 100755
index 8ca5d3b77..000000000
--- a/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_firewall_interface.sh
+++ /dev/null
@@ -1,111 +0,0 @@
-#!/bin/sh
-# This will add $net to the zone firewall (and remove it from other zones where it is referenced)
-# It will also setup rules defined in /etc/config/freifunk and /etc/config/profile_<community>
-# Arg $1 = $net
-
-net=$1
-. /lib/functions.sh
-. $dir/functions.sh
-config_load firewall
-
-# Get some variables
-type="$(uci -q get wireless.$net.type)"
-vap="$(uci -q get meshwizard.netconfig.$net\_vap)"
-wan_is_olsr=$(uci -q get meshwizard.netconfig.wan_config)
-
-# Delete old firewall zone for freifunk
-handle_fwzone() {
- config_get name "$1" name
- config_get network "$1" network
-
- if [ "$2" == "zoneconf" ]; then
- if [ "$name" == "freifunk" ]; then
- # rename section if unnamed
- if [ -z "${1/cfg[0-9a-fA-F]*/}" ]; then
- section_rename firewall $1 zone_freifunk
- fi
- else
- if [ ! "$name" == "freifunk" ] && [ -n "$netrenamed" -a -n "$(echo $network | grep $netrenamed)" ]; then
- echo " Removed $netrenamed from firewall zone $name."
- network_new=$(echo $network | sed -e 's/'$netrenamed'//' -e 's/^ //' -e 's/ / /' -e 's/ $//')
- uci set firewall.$1.network="$network_new"
- fi
- fi
- fi
-}
-
-config_foreach handle_fwzone zone zoneconf
-
-# Add $netrenamed and if needed ${netrenamed}dhcp to the "freifunk" zone
-config_get network zone_freifunk network
-
-# remove ${netrenamed}dhcp from networks list
-[ -n "$network" -a -n "$net" ] && network="${network/${netrenamed}dhcp/}"
-network=$(echo $network) # Removes leading and trailing whitespaces
-
-[ -n "$netrenamed" ] && [ -z "$(echo $network | grep $netrenamed)" ] && network="$network $netrenamed"
-
-if [ "$supports_vap" == "1" -a "$vap" == 1 ]; then
- [ -n "$netrenamed" ] && [ "$network" == "${network/${netrenamed}dhcp/}" ] && network="$network ${netrenamed}dhcp"
-fi
-
-uci set firewall.zone_freifunk.network="$network"
-
-uci_commitverbose "Add '$netrenamed' to freifunk firewall zone" firewall
-
-currms=$(uci -q get firewall.zone_freifunk.masq_src)
-
-# If interfaces are outside of the mesh network they should be natted
-
-if [ "$vap" == 1 ]; then
- # Get dhcprange and meshnet for the dhcp interface
- if_ip="$(uci -q get network.${netrenamed}dhcp.ipaddr)"
- if_mask="$(uci -q get network.${netrenamed}dhcp.netmask)"
-
- [ -n "$if_ip" -a "$if_mask" ] && export $(ipcalc.sh $if_ip $if_mask)
- [ -n "$NETWORK" -a "$PREFIX" ] && dhcprange="$NETWORK/$PREFIX"
-
- if [ -n "$dhcprange" ]; then
- meshnet="$(uci get profile_$community.profile.mesh_network)"
- # check if the dhcprange is inside meshnet
- dhcpinmesh="$($dir/helpers/check-range-in-range.sh $dhcprange $meshnet)"
- if [ "$dhcpinmesh" == 1 ]; then
- # needed or splash will not work
- if [ "$has_luci_splash" == TRUE ]; then
- uci set firewall.zone_freifunk.contrack="1"
- fi
- else
- uci set firewall.zone_freifunk.masq=1
- [ -z "$(echo $currms |grep ${netrenamed}dhcp)" ] && uci add_list firewall.zone_freifunk.masq_src="${netrenamed}dhcp"
- fi
- fi
-fi
-
-# Get dhcprange and meshnet for the adhoc dhcp interface
-if_ip="$(uci -q get network.${netrenamed}ahdhcp.ipaddr)"
-if_mask="$(uci -q get network.${netrenamed}ahdhcp.netmask)"
-
-[ -n "$if_ip" -a "$if_mask" ] && export $(ipcalc.sh $if_ip $if_mask)
-[ -n "$NETWORK" -a "$PREFIX" ] && dhcprangeah="$NETWORK/$PREFIX"
-
-if [ -n "$dhcprangeah" ]; then
- meshnet="$(uci get profile_$community.profile.mesh_network)"
- # check if the dhcprange is inside meshnet
- dhcpinmesh="$($dir/helpers/check-range-in-range.sh $dhcprangeah $meshnet)"
- if [ "$dhcpinmesh" == 1 ]; then
- # needed or splash will not work
- if [ "$has_luci_splash" == TRUE ]; then
- uci set firewall.zone_freifunk.contrack="1"
- fi
- else
- uci set firewall.zone_freifunk.masq=1
- [ -z "$(echo $currms |grep ${netrenamed}ahdhcp)" ] && uci add_list firewall.zone_freifunk.masq_src="${netrenamed}ahdhcp"
- fi
-fi
-
-
-for i in IP NETMASK BROADCAST NETWORK PREFIX; do
- unset $i
-done
-
-uci_commitverbose "Setup masquerading rules for '$netrenamed'" firewall
diff --git a/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_lan_ipv6.sh b/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_lan_ipv6.sh
deleted file mode 100755
index 1b4f9b16f..000000000
--- a/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_lan_ipv6.sh
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/sh
-
-[ ! "$(uci -q get network.lan)" == "interface" ] && exit
-
-. /lib/functions.sh
-. $dir/functions.sh
-
-# Setup IPv6 for the lan interface
-
-ip6addr=""
-if [ "$ipv6_config" = "auto-ipv6-dhcpv6" ]; then
- # get lan mac
- device="$(uci -p/var/state -q get network.lan.ifname)"
- if [ -n "device" ]; then
- ip6addr="$($dir/helpers/gen_auto-ipv6-dhcpv6-ip.sh $device)"
- fi
- uci set network.lan.ip6addr="${ip6addr}/112"
-fi
-
-uci_commitverbose "Setup ipv6 address for lan" network
diff --git a/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_lan_static.sh b/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_lan_static.sh
deleted file mode 100755
index 172dcf138..000000000
--- a/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_lan_static.sh
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/bin/sh
-# Setup static interface settings for lan if lan is not an olsr interface
-
-[ ! "$(uci -q get network.lan)" == "interface" ] && exit
-
-. /lib/functions.sh
-. $dir/functions.sh
-
-uci batch << EOF
- set network.lan.proto='$lan_proto'
- set network.lan.ipaddr='$lan_ip4addr'
- set network.lan.netmask='$lan_netmask'
-EOF
-
-uci_commitverbose "Setup static ip settings for lan" network
-
-uci delete meshwizard.lan && uci commit meshwizard
diff --git a/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_network.sh b/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_network.sh
deleted file mode 100755
index 3ad977e26..000000000
--- a/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_network.sh
+++ /dev/null
@@ -1,142 +0,0 @@
-# setup entry in /etc/config/network for a interface
-# Argument $1: network interface
-
-net="$1"
-. /lib/functions.sh
-. $dir/functions.sh
-
-# Setup a (new) interface section for $net
-
-ipaddr=$(uci -q get meshwizard.netconfig.$net\_ip4addr)
-ip6addr=$(uci -q get meshwizard.netconfig.$net\_ip6addr)
-[ -z "$ipaddr" ] && msg_missing_value meshwizard $net\_ip4addr
-
-netmask=$(uci -q get meshwizard.netconfig.$net\_netmask)
-[ -z "$netmask" ] && netmask="$interface_netmask"
-[ -z "$netmask" ] && netmask="255.255.0.0"
-
-uci set network.$netrenamed="interface"
-set_defaults "interface_" network.$netrenamed
-
-uci batch << EOF
- set network.$netrenamed.proto="static"
- set network.$netrenamed.ipaddr="$ipaddr"
- set network.$netrenamed.netmask="$netmask"
-EOF
-
-if [ "$netrenamed" = "lan" ]; then
- # remove the bridge if the interface is used for olsr
- # since this script is only run in this case, no need
- # to check for lan_proto = "olsr" currently.
- uci -q delete network.lan.type
-fi
-
-# Setup IPv6 for the interface
-if [ "$ipv6_enabled" = 1 ]; then
- if [ "$ipv6_config" = "auto-ipv6-dhcpv6" ]; then
- ip6addr="$($dir/helpers/gen_auto-ipv6-dhcpv6-ip.sh $netrenamed)"
- uci set network.$netrenamed.ip6addr="${ip6addr}/112"
- fi
- if [ "$ipv6_config" = "static" ] && [ -n "$ip6addr" ]; then
- uci set network.$netrenamed.ip6addr="$ip6addr"
- fi
-fi
-
-uci_commitverbose "Setup interface $netrenamed" network
-
-# setup dhcp alias/interface
-
-net_dhcp=$(uci -q get meshwizard.netconfig.${net}_dhcp)
-if [ "$net_dhcp" == 1 ]; then
-
- # Load meshwizard_settings
- dhcprange="$(uci -q get meshwizard.netconfig.${net}_dhcprange)"
- interface_ip="$(uci -q get meshwizard.netconfig.${net}_ip4addr)"
- vap=$(uci -q get meshwizard.netconfig.${net}_vap)
-
- # Rename config
- handle_dhcpalias() {
- config_get interface "$1" interface
- if [ "$interface" == "$netrenamed" ]; then
- if [ -z "${1/cfg[0-9a-fA-F]*/}" ]; then
- section_rename network $1 ${netrenamed}dhcp
- fi
- fi
- }
- config_load network
- config_foreach handle_dhcpalias interface
-
- # Get IP/netmask and start-ip for $net dhcp
- # If no dhcprange is given in /etc/config/meshwizard we autogenerate one
-
- if [ -z "$dhcprange" ]; then
- dhcprange="$($dir/helpers/gen_dhcp_ip.sh $interface_ip)/24"
- uci set meshwizard.netconfig.${net}_dhcprange="$dhcprange"
- fi
-
- # If we use VAP and also offer dhcp on the adhoc interface then cut the dhcp
- # range in two halves. one for the adhoc, one for the managed VAP interface
- ahdhcp_when_vap="$(uci get profile_$community.profile.adhoc_dhcp_when_vap)"
-
- if [ "$supports_vap" = 1 -a "$vap" = 1 -a "$ahdhcp_when_vap" = 1 ]; then
- # VAPs are enabled for this interface, supported and we want to
- # also use DHCP on the adhoc interface
- network=${dhcprange%%/*}
- mask=${dhcprange##*/}
- # Divide network size by adding 1 to the netmask
- mask=$(($mask + 1))
- # Get first ip and netmask for the adhoc dhcp network
- eval $(sh $dir/helpers/ipcalc-cidr.sh ${network}/${mask} 1 0)
- STARTADHOC=$START
- NETMASKADHOC=$NETMASK
- # Get first ip and netmask for the managed dhcp network
- eval $(sh $dir/helpers/ipcalc-cidr.sh ${NEXTNET}/${mask} 1 0)
- STARTVAP=$START
- NETMASKVAP=$NETMASK
- # Add dhcp interface
- uci batch <<- EOF
- set network.${netrenamed}dhcp=interface
- set network.${netrenamed}dhcp.proto=static
- set network.${netrenamed}dhcp.ipaddr="$STARTVAP"
- set network.${netrenamed}dhcp.netmask="$NETMASKVAP"
- EOF
- uci_commitverbose "Setup interface for ${netrenamed}dhcp" network
- else
- eval $(sh $dir/helpers/ipcalc-cidr.sh $dhcprange 1 0)
- STARTADHOC=$START
- NETMASKADHOC=$NETMASK
- fi
- if [ "$supports_vap" = 1 -a "$vap" = 1 -a "$ahdhcp_when_vap" != 1 ]; then
- # vaps are enabled and supported and we do not use DHCP on adhoc
- # Add dhcp interface
- uci batch <<- EOF
- set network.${netrenamed}dhcp=interface
- set network.${netrenamed}dhcp.proto=static
- set network.${netrenamed}dhcp.ipaddr="$STARTADHOC"
- set network.${netrenamed}dhcp.netmask="$NETMASKADHOC"
- EOF
- uci_commitverbose "Setup interface for ${netrenamed}dhcp" network
- fi
-
-
- # Setup alias for $net adhoc interface
- if [ "$supports_vap" = 0 ] || \
- [ "$vap" = 0 ] || \
- [ "$supports_vap" = 1 -a "$vap" = 1 -a "$ahdhcp_when_vap" = 1 ] || \
- [ "$lan_is_olsr" = "1" ]; then
- # setup an alias interface for the main interface to use as a network for clients
- # when one of the following conditions is met
- # * vaps are not supported
- # * or not enabled
- # * or they are supported and enabled but we also want to use DHCP on the adhoc interface
- # * or this is the lan interface and it is used for olsrd (and dhcp is enabled)
- uci batch <<- EOF
- set network.${netrenamed}ahdhcp=interface
- set network.${netrenamed}ahdhcp.ifname="@${netrenamed}"
- set network.${netrenamed}ahdhcp.proto=static
- set network.${netrenamed}ahdhcp.ipaddr="$STARTADHOC"
- set network.${netrenamed}ahdhcp.netmask="$NETMASKADHOC"
- EOF
- uci_commitverbose "Setup interface for ${netrenamed}ahdhcp" network
- fi
-fi
diff --git a/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_olsrd.sh b/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_olsrd.sh
deleted file mode 100755
index a435e4b1b..000000000
--- a/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_olsrd.sh
+++ /dev/null
@@ -1,160 +0,0 @@
-#!/bin/sh
-# Sets up olsrd
-
-. /lib/functions.sh
-. $dir/functions.sh
-
-protocols="4"
-if [ "$ipv6_enabled" = 1 ] && [ "$has_ipv6" == "1" ]; then
- protocols="4 6"
-fi
-
-clean_config() {
- # Clean the config, remove interface wlan
- handle_interface() {
- config_get interface "$1" interface
- if [ "$interface" = "wlan" ]; then
- uci delete $cfg.$1
- fi
- }
- config_foreach handle_interface Interface
-}
-
-rename_olsrd() {
- #Rename olsrd basic settings
- handle_olsrd() {
- if [ -z "${1/cfg[0-9a-fA-F]*/}" ]; then
- section_rename $cfg $1 olsrd
- fi
- }
- config_foreach handle_olsrd olsrd
-}
-
-rename_interface_defaults() {
- # Rename interface defaults
- handle_interfacedefaults() {
- if [ -z "${1/cfg[0-9a-fA-F]*/}" ]; then
- section_rename $cfg $1 InterfaceDefaults
- fi
- }
- config_foreach handle_interfacedefaults InterfaceDefaults
-}
-
-cleanup_plugins() {
- # Rename nameservice, dyngw and httpinfo plugins
- handle_plugin() {
- config_get library "$1" library
- if [ -z "${1/cfg[0-9a-fA-F]*/}" ]; then
- new="$(echo $library | cut -d '.' -f 1)"
- section_rename $cfg "$1" "$new"
- fi
- }
- config_foreach handle_plugin LoadPlugin
- uci -q delete $cfg.olsrd_httpinfo
- uci -q delete $cfg.olsrd_dyn_gw
-}
-
-setup_nameservice() {
- # Setup nameservice plugin
- if [ -n "$profile_suffix" ]; then
- suffix=".$profile_suffix"
- else
- suffix=".olsr"
- fi
- local llfile="/var/run/latlon.js"
- local hosts="/var/etc/hosts.olsr"
- local services="/var/run/services_olsr"
-
- if [ "$proto" = "6" ]; then
- local llfile="/var/run/latlon.js.ipv6"
- local hosts="/var/etc/hosts.olsr.ipv6"
- local services="/var/run/services_olsr.ipv6"
- fi
-
- uci batch <<- EOF
- set $cfg.olsrd_nameservice=LoadPlugin
- set $cfg.olsrd_nameservice.library="olsrd_nameservice"
- set $cfg.olsrd_nameservice.latlon_file="$llfile"
- set $cfg.olsrd_nameservice.hosts_file="$hosts"
- set $cfg.olsrd_nameservice.sighup_pid_file="/var/run/dnsmasq.pid"
- set $cfg.olsrd_nameservice.services_file="$services"
- set $cfg.olsrd_nameservice.suffix="$suffix"
- EOF
-
- uci_commitverbose "Setup olsr nameservice plugin" $cfg
-}
-
-setup_dyngw_plain() {
- # Setup dyngw_plain
- # If Sharing of Internet is enabled then enable dyngw_plain plugin
-
- if [ "$general_sharenet" == 1 ]; then
- uci set $cfg.dyngw_plain=LoadPlugin
- uci set $cfg.dyngw_plain.ignore=0
- uci set $cfg.dyngw_plain.library="olsrd_dyn_gw_plain"
- uci_commitverbose "Setup olsrd_dyngw_plain plugin" $cfg
- fi
-
-}
-
-setup_watchdog() {
- # Setup watchdog
- local watchdogfile="/var/run/olsrd.watchdog"
- if [ "$proto" = "6" ]; then
- watchdogfile="/var/run/olsrd.watchdog.ipv6"
- fi
-
- uci batch <<- EOF
- set $cfg.olsrd_watchdog=LoadPlugin
- set $cfg.olsrd_watchdog.library="olsrd_watchdog"
- set $cfg.olsrd_watchdog.file="$watchdogfile"
- set $cfg.olsrd_watchdog.interval=30
- EOF
- uci_commitverbose "Setup olsr watchdog plugin" $cfg
-
-}
-
-setup_jsoninfo() {
- proto="$1"
- uci batch <<- EOF
- set $cfg.olsrd_jsoninfo=LoadPlugin
- set $cfg.olsrd_jsoninfo.library="olsrd_jsoninfo"
- EOF
- if [ "$proto" = "6" ]; then
- uci set $cfg.olsrd_jsoninfo.ipv6only='1'
- fi
- uci_commitverbose "Setup olsr jsoninfo plugin" $cfg
-}
-
-setup_txtinfo() {
- proto="$1"
- uci batch <<- EOF
- set $cfg.olsrd_txtinfo=LoadPlugin
- set $cfg.olsrd_txtinfo.library="olsrd_txtinfo"
- EOF
- if [ "$proto" = "6" ]; then
- uci set $cfg.olsrd_txtinfo.ipv6only='1'
- fi
- uci_commitverbose "Setup olsr txtinfo plugin" $cfg
-}
-
-
-for proto in $protocols; do
- cfg="olsrd"
- [ "$proto" == "6" ] && cfg="olsrd6"
- config_load $cfg
- clean_config
- rename_olsrd
- cleanup_plugins
-
- uci set $cfg.olsrd.IpVersion="$proto"
- uci set $cfg.InterfaceDefaults=InterfaceDefaults
- set_defaults "olsr_interfacedefaults_" $cfg.InterfaceDefaults
- uci_commitverbose "Cleanup olsrd config" $cfg
-
- setup_nameservice
- setup_dyngw_plain
- setup_watchdog
- setup_jsoninfo $proto
- setup_txtinfo $proto
-done
diff --git a/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_olsrd_interface.sh b/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_olsrd_interface.sh
deleted file mode 100755
index 59f99bd0a..000000000
--- a/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_olsrd_interface.sh
+++ /dev/null
@@ -1,76 +0,0 @@
-#!/bin/sh
-# Sets up olsrd interfaces
-# arg $1 = net
-
-net=$1
-
-. /lib/functions.sh
-. $dir/functions.sh
-
-protocols="4"
-if [ "$ipv6_enabled" = 1 ] && [ "$has_ipv6" == "1" ]; then
- protocols="4 6"
-fi
-
-for proto in $protocols; do
-
- cfg="olsrd"
- [ "$proto" == "6" ] && cfg="olsrd6"
-
- # Rename interface for $netrenamed
- handle_interface() {
- config_get interface "$1" Interface
- if [ "$interface" == "$netrenamed" ]; then
- if [ -z "${1/cfg[0-9a-fA-F]*/}" ]; then
- section_rename $cfg $1 $netrenamed
- fi
- fi
- }
-
- config_foreach handle_interface Interface
-
- # Setup new interface for $netrenamed
-
- uci set $cfg.$netrenamed=Interface
- set_defaults "olsr_interface_" $cfg.$net
- uci set $cfg.$netrenamed.interface="$netrenamed"
-
- uci_commitverbose "Setup olsr interface for $netrenamed." $cfg
-
- if [ "$proto" = "4" ]; then
- # If dhcp-network is inside the mesh_network then add HNA for it
-
- dhcprange=$(uci -q get meshwizard.netconfig.$net\_dhcprange)
- uci -q delete $cfg.${netrenamed}clients
-
- if [ -n "$dhcprange" ]; then
- meshnet="$(uci get profile_$community.profile.mesh_network)"
- dhcpinmesh="$($dir/helpers/check-range-in-range.sh $dhcprange $meshnet)"
-
- if [ "$dhcpinmesh" == 1 ] && [ -n "$meshnet" ]; then
- uci set $cfg.${netrenamed}clients="Hna4"
- eval $(sh $dir/helpers/ipcalc-cidr.sh $dhcprange)
- uci set $cfg.${netrenamed}clients.netaddr="$NETWORK"
- uci set $cfg.${netrenamed}clients.netmask="$NETMASK"
- uci_commitverbose "Setup HNA for network $dhcprange" $cfg
- fi
- fi
- fi
-
- if [ "$proto" = "6" ]; then
- # Set Hna entry for ipv6 net for static ipv6 config
- uci -q delete $cfg.${netrenamed}static
- if [ "$ipv6_config" = "static" ]; then
- v6range="$(uci -q get meshwizard.netconfig.$net\_ip6addr)"
- v6net="$(echo $v6range | cut -d '/' -f 1)"
- v6mask="$(echo $v6range | cut -d '/' -f 2)"
- if [ -n "$v6net" ] && [ -n "$v6mask" ]; then
- uci set $cfg.${netrenamed}static="Hna6"
- uci set $cfg.${netrenamed}static.netaddr="$v6net"
- uci set $cfg.${netrenamed}static.prefix="$v6mask"
- uci_commitverbose "Setup HNA for network $v6range" $cfg
- fi
- fi
- fi
-
-done \ No newline at end of file
diff --git a/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_policyrouting.sh b/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_policyrouting.sh
deleted file mode 100755
index f898bd684..000000000
--- a/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_policyrouting.sh
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/sh
-
-. $dir/functions.sh
-
-uci batch << EOF
- set freifunk-policyrouting.pr.enable=1
- set freifunk-policyrouting.pr.strict=1
- set freifunk-policyrouting.pr.zones="freifunk"
-EOF
-
-uci_commitverbose "Setup policyrouting" freifunk-policyrouting
diff --git a/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_qos.sh b/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_qos.sh
deleted file mode 100755
index 25884b30d..000000000
--- a/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_qos.sh
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/bin/sh
-# sets up qos-scripts for the wan interface
-
-. /lib/functions.sh
-. $dir/functions.sh
-
-if [ ! -f /etc/config/qos ]; then
- echo "NOT setting up QOS because /etc/config/qos-scripts was not found"
-else
- uci batch <<- EOF
- set qos.wan.enabled=1
- set qos.wan.upload=$wan_up
- set qos.wan.download=$wan_down
- EOF
- uci_commitverbose "Setup QOS on WAN interface." qos
-
-fi
diff --git a/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_splash.sh b/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_splash.sh
deleted file mode 100755
index 3c3e6a32e..000000000
--- a/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_splash.sh
+++ /dev/null
@@ -1,54 +0,0 @@
-#!/bin/sh
-# Setup_splash, takes 1 argument: 1=net
-
-. /lib/functions.sh
-. $dir/functions.sh
-
-net=$1
-vap=$(uci -q get meshwizard.netconfig.${net}_vap)
-
-if [ ! "$has_luci_splash" == TRUE ]; then
- echo " Luci Splash is not installed, skipping setup of it."
- exit
-fi
-
-set_defaults "luci_splash_" luci_splash.general
-uci_commitverbose "Setup general splash settings" luci_splash
-
-dhcprange=$(uci -q get meshwizard.netconfig.$net\_dhcprange)
-
-splash_net_add() {
- uci batch <<- EOF
- set luci_splash.$1="iface"
- set luci_splash.$1.network="$1"
- set luci_splash.$1.zone="freifunk"
- EOF
-}
-
-if [ "$(uci -q get meshwizard.netconfig.$net\_dhcp)" = 1 ] && [ -n "$dhcprange" ]; then
- handle_splash() {
- config_get network "$1" network
- if [ "$network" == "${netrenamed}dhcp" ]; then
- if [ -z "${1/cfg[0-9a-fA-F]*/}" ]; then
- section_rename luci_splash $1 ${netrenamed}dhcp
- fi
- fi
- }
- config_load luci_splash
- config_foreach handle_splash iface
-
- if [ "$supports_vap" = 1 -a "$vap" = 1 ]; then
- splash_net_add ${netrenamed}dhcp
- uci_commitverbose "Setup dhcpsplash for ${netrenamed}dhcp" luci_splash
- fi
-
- ahdhcp_when_vap="$(uci get profile_$community.profile.adhoc_dhcp_when_vap)"
- if [ "$supports_vap" = 0 ] || \
- [ "$supports_vap" = 1 -a "$vap" = 1 -a "$ahdhcp_when_vap" = 1 ] || \
- [ "$lan_dhcp" = 1 ]; then
- splash_net_add ${netrenamed}ahdhcp
- uci_commitverbose "Setup dhcpsplash for ${netrenamed}ahdhcp" luci_splash
- fi
- /etc/init.d/luci_splash enable
-fi
-
diff --git a/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_ssh.sh b/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_ssh.sh
deleted file mode 100755
index 38b331e71..000000000
--- a/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_ssh.sh
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/bin/sh
-# Setup ssh. At this point only used to store pubkeys.
-
-[ ! "$(uci -q get meshwizard.ssh)" == "system" ] && exit
-
-. /lib/functions.sh
-. $dir/functions.sh
-authorized="/etc/dropbear/authorized_keys"
-
-
-config_load meshwizard
-
-i=0
-handle_pubkeys() {
- local k="$1"
- ( [ -f "$authorized" ] && grep -q "$k" $authorized) || {
- echo "$k" >> $authorized
- i=`expr $i + 1`
- }
-}
-
-config_list_foreach ssh pubkey handle_pubkeys
-
-uci delete meshwizard.ssh
-uci_commitverbose "Added $i pubkeys to authorized_keys" meshwizard
-
diff --git a/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_system.sh b/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_system.sh
deleted file mode 100755
index e9ce953f1..000000000
--- a/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_system.sh
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/sh
-
-. $dir/functions.sh
-
-set_defaults "system_" system.system
-uci -q delete meshwizard.system && uci commit meshwizard
-uci_commitverbose "System config" system
diff --git a/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_uhttpd.sh b/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_uhttpd.sh
deleted file mode 100755
index b25a1756c..000000000
--- a/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_uhttpd.sh
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/sh
-. $dir/functions.sh
-if [ "$ipv6_enabled" = "1" ]; then
- uci batch <<- EOF
- set uhttpd.main.listen_http="80"
- set uhttpd.main.listen_https="443"
- EOF
-fi
-
-uci_commitverbose "Setup uhttpd" uhttpd
-
diff --git a/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_wan_dhcp.sh b/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_wan_dhcp.sh
deleted file mode 100755
index 91fc1d8da..000000000
--- a/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_wan_dhcp.sh
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/bin/sh
-# Setup dhcp interface settings for wan. This is the OpenWrt default,
-# so all we need to do here is to delete wan from meshwizard after setup.
-# Also disallow ra on wan if ipv6 is enabled
-
-[ ! "$(uci -q get network.wan)" == "interface" ] && exit
-
-. /lib/functions.sh
-. $dir/functions.sh
-
-if [ "$ipv6_enabled" = "1" ]; then
- uci set network.wan.accept_ra='0'
- uci_commitverbose "Do not accept ra on wan interface" network
-fi
-
-
-uci delete meshwizard.wan && uci commit meshwizard
-
diff --git a/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_wan_static.sh b/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_wan_static.sh
deleted file mode 100755
index 570470aa7..000000000
--- a/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_wan_static.sh
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/sh
-# Setup static interface settings for wan if wan is not an olsr interface
-
-[ ! "$(uci -q get network.wan)" == "interface" ] && exit
-
-. /lib/functions.sh
-. $dir/functions.sh
-
-uci batch << EOF
-set network.wan.proto='$wan_proto'
-set network.wan.ipaddr='$wan_ip4addr'
-set network.wan.netmask='$wan_netmask'
-set network.wan.gateway='$wan_gateway'
-set network.wan.dns='$wan_dns'
-EOF
-
-uci_commitverbose "Setup static ip settings for wan" network
-
-uci delete meshwizard.wan && uci commit meshwizard
-
diff --git a/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_widgets.sh b/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_widgets.sh
deleted file mode 100755
index 288252f37..000000000
--- a/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_widgets.sh
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/bin/sh
-. /lib/functions.sh
- . $dir/functions.sh
-
-if [ -n "$widgets" ]; then
- [ ! -f "/etc/config/freifunk-widgets" ] && touch /etc/config/freifunk-widgets
- for w in $widgets; do
- uci set freifunk-widgets.${w}=widget
- set_defaults "${w}_" freifunk-widgets.${w}
- uci delete profile_$community.${w}
- done
- uci commit profile_$community
- uci_commitverbose "Added widget config." freifunk-widgets
-fi
diff --git a/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_wifi.sh b/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_wifi.sh
deleted file mode 100755
index 707b7b72c..000000000
--- a/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_wifi.sh
+++ /dev/null
@@ -1,80 +0,0 @@
-#!/bin/sh
-# sets up a wifi interface for meshing
-# Arguments: $1 = network interface
-
-net="$1"
-. /lib/functions.sh
-. $dir/functions.sh
-
-##### wifi-device #####
-
-# Get the type before we delete the wifi-device
-config_load wireless
-config_get type $net type
-
-# Rename wifi-device for $net
-
-handle_wifidevice() {
- if [ -z "${1/cfg[0-9a-fA-F]*/}" ]; then
- section_rename wireless $1 $net
- fi
-}
-config_foreach handle_wifidevice wifi-device
-
-# create new wifi-device for $net
-uci set wireless.${net}=wifi-device
-
-# get and set wifi-device defaults
-set_defaults "wifi_device_" wireless.${net}
-
-channel="$(uci -q get meshwizard.netconfig.$net\_channel)"
-
-if [ -z "$channel" -o "$channel" == "default" ]; then
- channel=$wifi_device_channel
-fi
-
-uci batch << EOF
- set wireless.${net}.type="$type"
- set wireless.${net}.channel="$channel"
-EOF
-
-uci_commitverbose "Setup wifi device for $netrenamed" wireless
-
-##### wifi iface
-
-# Rename wifi-iface for $net
-handle_interface() {
- config_get device "$1" device
- if [ "$device" == "$net" ]; then
- if [ -z "${1/cfg[0-9a-fA-F]*/}" ]; then
- section_rename wireless $1 ${net}_iface
- fi
- fi
-}
-config_foreach handle_interface wifi-iface
-
-# create new wifi-device for $net
-uci set wireless.$net\_iface=wifi-iface
-
-# create new wifi-iface for $net from defaults
-set_defaults "wifi_iface_" wireless.$net\_iface
-
-# overwrite defaults
-bssid="$($dir/helpers/gen_bssid.sh $channel $community)"
-
-ssid="$profile_ssid"
-if [ "$profile_ssid_scheme" == "addchannel" ]; then
- ssid="$ssid - ch$channel"
-elif [ "$profile_ssid_scheme" == "addchannelbefore" ]; then
- ssid="ch$channel.$ssid"
-fi
-
-uci batch << EOF
- set wireless.$net\_iface.device="${net}"
- set wireless.$net\_iface.network="$netrenamed"
- set wireless.$net\_iface.ssid="$ssid"
- set wireless.$net\_iface.bssid="$bssid"
-EOF
-
-uci_commitverbose "Setup wifi interface for $netrenamed" wireless
-
diff --git a/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_wifi_vap.sh b/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_wifi_vap.sh
deleted file mode 100755
index df58ad76d..000000000
--- a/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_wifi_vap.sh
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/sh
-# sets up a wifi interface for meshing
-# Arguments: $1 = network interface
-
-net="$1"
-. /lib/functions.sh
-. $dir/functions.sh
-
-## Setup a VAP interface in AP Mode
-ip4addr="$(uci get meshwizard.netconfig.$net\_ip4addr)"
-vap="$(uci -q get meshwizard.netconfig.$net\_vap)"
-
-if [ "$supports_vap" == 1 -a "$vap" == 1 ]; then
- uci batch <<- EOF
- set wireless.$net\_iface_dhcp="wifi-iface"
- set wireless.$net\_iface_dhcp.device="$net"
- set wireless.$net\_iface_dhcp.mode="ap"
- set wireless.$net\_iface_dhcp.encryption="none"
- set wireless.$net\_iface_dhcp.network="${netrenamed}dhcp"
- set wireless.$net\_iface_dhcp.ssid="Freifunk-$ip4addr"
- EOF
- uci_commitverbose "Setup VAP interface for $netrenamed" wireless
-fi
diff --git a/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/supports_vap.sh b/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/supports_vap.sh
deleted file mode 100755
index 7fdff3c56..000000000
--- a/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/supports_vap.sh
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/bin/sh
-# checks if a given device can be used for a VAP interface (1 adhoc + 1 ap)
-dev="$1"
-type="$2"
-
-
-if [ -z "$dev" -o -z "$type" ]; then
- exit 1
-fi
-
-if [ "$type" = "mac80211" ]; then
- # not hostapd[-mini], no VAP
- if [ ! -x /usr/sbin/hostapd ]; then
- echo "WARNING: hostapd[-mini] is required to be able to use VAP with mac80211."
- exit 1
- fi
- # get driver in use
- netindex="$(echo $dev |sed 's/[a-zA-z]*//')"
- if [ -d /sys/class/net/wlan${netindex}/device/driver/module ]; then
- driver="$(basename $(ls -l /sys/class/net/wlan${netindex}/device/driver/module | sed -ne 's/.* -> //p'))"
- if [ "$driver" = "ath9k" -o "$driver" = "ath5k" ]; then
- exit 0
- else
- exit 1
- fi
- else
- exit 1
- fi
-else
- exit 1
-fi
-
diff --git a/contrib/package/meshwizard/files/usr/bin/meshwizard/wizard.sh b/contrib/package/meshwizard/files/usr/bin/meshwizard/wizard.sh
deleted file mode 100755
index 450473868..000000000
--- a/contrib/package/meshwizard/files/usr/bin/meshwizard/wizard.sh
+++ /dev/null
@@ -1,147 +0,0 @@
-#!/bin/sh
-
-# This collection of scripts will take settings from /etc/config/meshwizard, /etc/config/freifunk
-# and /etc/config/profile_<community> and setup the router to participate in wireless mesh networks
-
-# Copyright 2011 Manuel Munz <freifunk at somakoma dot de>
-
-# Licensed under the Apache License, Version 2.0 (the "License")
-# You may not use this file except in compliance with the License.
-# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
-
-echo "
-/* Meshwizard 0.3.1 */
-"
-
-# config
-export dir="/usr/bin/meshwizard"
-
-. /lib/functions.sh
-. $dir/functions.sh
-. $dir/helpers/read_defaults.sh
-[ -f /proc/net/ipv6_route ] && export has_ipv6=1
-
-# Check which packages we have installed
-export has_luci=FALSE
-opkg list_installed |grep luci-mod-admin > /dev/null && export has_luci=TRUE
-export has_luci_splash=FALSE
-opkg list_installed |grep luci-app-splash > /dev/null && export has_luci_splash=TRUE
-
-# Check whether we want to cleanup/restore uci config before setting new options
-cleanup=$(uci -q get meshwizard.general.cleanup)
-[ "$cleanup" == 1 ] && restore_factory_defaults
-
-# Rename wifi interfaces
-$dir/helpers/rename-wifi.sh
-
-export lan_is_olsr="$(uci -q get meshwizard.netconfig.lan_config)"
-
-# Get community
-community="$(uci -q get meshwizard.community.name || uci -q get freifunk.community.name)"
-[ -z "$community" ] && echo "Error: Community is not set in /etc/config/freifunk, aborting now." && exit 1
-export community="$community"
-
-# we need a list of widgets later on. It will be populated in read_defaults.sh
-widgets=""
-
-# Get a list of networks we need to setup
-networks=$(uci show meshwizard.netconfig | grep -v "netconfig=" | sed -e 's/meshwizard.netconfig\.\(.*\)\_.*/\1/' |sort|uniq)
-export networks
-[ -z "$networks" ] && echo "Error: No networks to setup could be found in /etc/config/meshwizard, aborting now." && exit 1
-
-# Read defaults and node config
-read_defaults $community
-
-# Do config
-$dir/helpers/initial_config.sh
-$dir/helpers/setup_dnsmasq.sh
-$dir/helpers/setup_system.sh
-$dir/helpers/setup_olsrd.sh
-$dir/helpers/setup_firewall.sh
-$dir/helpers/setup_ssh.sh
-$dir/helpers/setup_uhttpd.sh
-$dir/helpers/setup_widgets.sh
-
-if [ "$wan_proto" == "static" ] && [ -n "$wan_ip4addr" ] && [ -n "$wan_netmask" ]; then
- $dir/helpers/setup_wan_static.sh
-fi
-
-if [ "$wan_proto" == "dhcp" ]; then
- $dir/helpers/setup_wan_dhcp.sh
-fi
-
-if [ -n "$wan_down" -a -n "$wan_up" ]; then
- $dir/helpers/setup_qos.sh
-fi
-
-if [ "$lan_proto" == "static" ] && [ -n "$lan_ip4addr" ] && [ -n "$lan_netmask" ]; then
- $dir/helpers/setup_lan_static.sh
-fi
-
-if [ "$ipv6_enabled" == 1 ] && [ "$has_ipv6" = 1 ]; then
- $dir/helpers/setup_lan_ipv6.sh
- # Setup auto-ipv6
- if [ -n "$(echo "$ipv6_config" |grep auto-ipv6)" ]; then
- $dir/helpers/setup_auto-ipv6.sh
- fi
-fi
-
-# Setup policyrouting if internet sharing is disabled and wan is not used for olsrd
-# Always disable it first to make sure its disabled when the user decied to share his internet
-uci set freifunk-policyrouting.pr.enable=0
-if [ ! "$general_sharenet" == 1 ] && [ ! "$(uci -q get meshwizard.netconfig.wan_proto)" == "olsr" ]; then
- $dir/helpers/setup_policyrouting.sh
-fi
-
-# Configure found networks
-for net in $networks; do
- # radioX devices need to be renamed
- netrenamed="${net/radio/wireless}"
- export netrenamed
-
- if [ ! "$net" == "wan" ] && [ ! "$net" == "lan" ]; then
- $dir/helpers/setup_wifi.sh $net
- # check if this net supports vap
- /sbin/wifi # wifi needs to be up for the check
- export supports_vap="0"
- type="$(uci -q get wireless.$net.type)"
- [ -n "$type" ] && $dir/helpers/supports_vap.sh $net $type && export supports_vap=1
- if [ "$supports_vap" = 1 ]; then
- $dir/helpers/setup_wifi_vap.sh $net
- fi
- fi
-
- $dir/helpers/setup_network.sh $net
-
- $dir/helpers/setup_olsrd_interface.sh $net
-
- net_dhcp=$(uci -q get meshwizard.netconfig.${net}_dhcp)
- export ${net}_dhcp=$net_dhcp
-
- if [ "$net" = "lan" ] && [ "$lan_is_olsr" = "1" ]; then
- uci -q set dhcp.lan.ignore="1"
- uci_commitverbose "Disable DHCP on LAN because it is an olsr interface." dhcp
- fi
-
- if [ "$net_dhcp" == 1 ]; then
- $dir/helpers/setup_dhcp.sh $net
- fi
-
- $dir/helpers/setup_splash.sh $net
- $dir/helpers/setup_firewall_interface.sh $net
-
- if [ -n "$(echo "$ipv6_config" |grep auto-ipv6)" ]; then
- $dir/helpers/setup_auto-ipv6-interface.sh $net
- fi
-done
-
-##### postinstall script
-
-[ -f /etc/rc.local.meshkitpostinstall ] && /etc/rc.local.meshkitpostinstall
-
-
-##### Reboot the router (because simply restarting services gave errors)
-
-echo "+ The wizard has finished and the router will reboot now."
-
-reboot