nodewatcher: move to separate package

- remove template parameter NETMON_IP (it's always the same)
- add new fff-nodewatcher package
- move nodewatcher, configurator, syncHostname to fff-nodewatcher
- fff-base selects fff-nodewatcher

Signed-off-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
Reviewed-by: Steffen Pankratz <kratz00@gmx.de>
This commit is contained in:
Tim Niemeyer 2015-12-19 13:44:41 +01:00 committed by Steffen Pankratz
parent 95584de639
commit aad3ba8403
15 changed files with 54 additions and 22 deletions

View File

@ -23,7 +23,7 @@ CONFIG_KMOD_BATMAN_ADV_LEGACY_BATCTL=y
CONFIG_KMOD_BATMAN_ADV_LEGACY_BLA=y
CONFIG_KMOD_BATMAN_ADV_LEGACY_DAT=y
CONFIG_KMOD_BATMAN_ADV_LEGACY_NC=y
CONFIG_PACKAGE_alfred=y
# CONFIG_PACKAGE_ALFRED_VIS is not set
CONFIG_PACKAGE_arptables=y
# CONFIG_PACKAGE_dnsmasq is not set
CONFIG_PACKAGE_ebtables=y
@ -61,8 +61,6 @@ CONFIG_PACKAGE_kmod-sched-connmark=y
CONFIG_PACKAGE_kmod-sched-core=y
CONFIG_PACKAGE_kmod-stp=y
CONFIG_PACKAGE_kmod-tun=y
CONFIG_PACKAGE_libpthread=y
CONFIG_PACKAGE_librt=y
CONFIG_PACKAGE_libugpio=y
# CONFIG_PACKAGE_odhcpd is not set
# CONFIG_PACKAGE_opkg is not set
@ -74,4 +72,3 @@ CONFIG_PACKAGE_wireless-tools=y
# CONFIG_FASTD_ENABLE_MAC_GHASH is not set
# CONFIG_FASTD_ENABLE_METHOD_COMPOSED_GMAC is not set
# CONFIG_FASTD_ENABLE_METHOD_GENERIC_GMAC is not set
# CONFIG_PACKAGE_ALFRED_VIS is not set

View File

@ -1,3 +1,2 @@
*/5 * * * * sleep $(/usr/bin/random 0 29); sh /etc/fastdstart.sh; sh /etc/nodewatcher.sh; sleep $(/usr/bin/random 0 209); sh /etc/configurator.sh
*/30 * * * * sleep $(/usr/bin/random 0 1790); /etc/syncHostname.sh
*/5 * * * * sleep $(/usr/bin/random 0 29); sh /etc/fastdstart.sh
*/1 * * * * /usr/sbin/batctl gw off; sleep 1; /usr/sbin/batctl gw client

View File

@ -23,7 +23,7 @@ CONFIG_KMOD_BATMAN_ADV_LEGACY_BATCTL=y
CONFIG_KMOD_BATMAN_ADV_LEGACY_BLA=y
CONFIG_KMOD_BATMAN_ADV_LEGACY_DAT=y
CONFIG_KMOD_BATMAN_ADV_LEGACY_NC=y
CONFIG_PACKAGE_alfred=y
# CONFIG_PACKAGE_ALFRED_VIS is not set
CONFIG_PACKAGE_arptables=y
# CONFIG_PACKAGE_dnsmasq is not set
CONFIG_PACKAGE_ebtables=y
@ -61,8 +61,6 @@ CONFIG_PACKAGE_kmod-sched-connmark=y
CONFIG_PACKAGE_kmod-sched-core=y
CONFIG_PACKAGE_kmod-stp=y
CONFIG_PACKAGE_kmod-tun=y
CONFIG_PACKAGE_libpthread=y
CONFIG_PACKAGE_librt=y
CONFIG_PACKAGE_libugpio=y
# CONFIG_PACKAGE_odhcpd is not set
# CONFIG_PACKAGE_opkg is not set
@ -74,4 +72,3 @@ CONFIG_PACKAGE_wireless-tools=y
# CONFIG_FASTD_ENABLE_MAC_GHASH is not set
# CONFIG_FASTD_ENABLE_METHOD_COMPOSED_GMAC is not set
# CONFIG_FASTD_ENABLE_METHOD_GENERIC_GMAC is not set
# CONFIG_PACKAGE_ALFRED_VIS is not set

View File

@ -23,7 +23,7 @@ CONFIG_KMOD_BATMAN_ADV_LEGACY_BATCTL=y
CONFIG_KMOD_BATMAN_ADV_LEGACY_BLA=y
CONFIG_KMOD_BATMAN_ADV_LEGACY_DAT=y
CONFIG_KMOD_BATMAN_ADV_LEGACY_NC=y
CONFIG_PACKAGE_alfred=y
# CONFIG_PACKAGE_ALFRED_VIS is not set
CONFIG_PACKAGE_arptables=y
# CONFIG_PACKAGE_dnsmasq is not set
CONFIG_PACKAGE_ebtables=y
@ -61,8 +61,6 @@ CONFIG_PACKAGE_kmod-sched-connmark=y
CONFIG_PACKAGE_kmod-sched-core=y
CONFIG_PACKAGE_kmod-stp=y
CONFIG_PACKAGE_kmod-tun=y
CONFIG_PACKAGE_libpthread=y
CONFIG_PACKAGE_librt=y
CONFIG_PACKAGE_libugpio=y
# CONFIG_PACKAGE_odhcpd is not set
# CONFIG_PACKAGE_opkg is not set
@ -74,4 +72,3 @@ CONFIG_PACKAGE_wireless-tools=y
# CONFIG_FASTD_ENABLE_MAC_GHASH is not set
# CONFIG_FASTD_ENABLE_METHOD_COMPOSED_GMAC is not set
# CONFIG_FASTD_ENABLE_METHOD_GENERIC_GMAC is not set
# CONFIG_PACKAGE_ALFRED_VIS is not set

View File

@ -3,7 +3,6 @@ BATMAN_CHANNEL_5GHZ=36
ESSID_AP=aux.franken.freifunk.net
ESSID_MESH=batman.franken.freifunk.net
BSSID_MESH=CA:FF:EE:BA:BE:01
NETMON_IP=fe80::ff:feee:1
VPN_PROJECT=fffaux
NTPD_IP=fe80::ff:feee:1%br-mesh
UPGRADE_PATH=http://[fe80::ff:feee:1%br-mesh]/dev/firmware/aux/current/

View File

@ -3,7 +3,6 @@ BATMAN_CHANNEL_5GHZ=36
ESSID_AP=franken.freifunk.net
ESSID_MESH=batman.franken.freifunk.net
BSSID_MESH=02:CA:FF:EE:BA:BE
NETMON_IP=fe80::ff:feee:1
VPN_PROJECT=fff
NTPD_IP=fe80::ff:feee:1%br-mesh
UPGRADE_PATH=http://[fe80::ff:feee:1%br-mesh]/dev/firmware/current/
UPGRADE_PATH=http://[fe80::ff:feee:1%br-mesh]/dev/firmware/current/

View File

@ -0,0 +1,42 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=fff-nodewatcher
PKG_VERSION:=35
PKG_RELEASE:=1
PKG_BUILD_DIR:=$(BUILD_DIR)/fff-nodewatcher
include $(INCLUDE_DIR)/package.mk
define Package/fff-nodewatcher
SECTION:=base
CATEGORY:=Freifunk
TITLE:= Freifunk-Franken Nodewatcher
URL:=http://www.freifunk-franken.de
DEPENDS:=+alfred +micrond
endef
define Package/fff-nodewatcher/description
This is the Nodewatcher for the Freifunk Franken Firmware
It is used to send node status information to
monitoring.freifunk-franken.de and
netmon.freifunk-franken.de
endef
define Build/Prepare
echo "all: " > $(PKG_BUILD_DIR)/Makefile
endef
define Build/Configure
# nothing
endef
define Build/Compile
# nothing
endef
define Package/fff-nodewatcher/install
$(CP) ./files/* $(1)/
endef
$(eval $(call BuildPackage,fff-nodewatcher))

View File

@ -7,7 +7,7 @@ config 'script'
config 'api'
option 'ipv4_address' '1'
option 'ipv6_interface' 'br-mesh'
option 'ipv6_address' '${NETMON_IP}'
option 'ipv6_address' 'fe80::ff:feee:1'
option 'timeout' '5'
option 'retry' '5'
option 'api_key' '1'
@ -21,4 +21,4 @@ config 'crawl'
option 'update_hash' '1'
config 'netmon'
option 'autoadd_ipv6_address' '1'
option 'autoadd_ipv6_address' '1'

View File

@ -1,4 +1,4 @@
#!/bin/sh
[ "$ACTION" = "ifup" -a "$INTERFACE" = "wan" ] && {
sh /etc/configurator.sh
/usr/sbin/configurator
}

View File

@ -0,0 +1,2 @@
*/5 * * * * sleep $(/usr/bin/random 0 29); /usr/sbin/nodewatcher; sleep $(/usr/bin/random 0 209); /usr/sbin/configurator
*/30 * * * * sleep $(/usr/bin/random 0 1790); /usr/sbin/syncHostname

View File

@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=fff
PKG_VERSION:=0.0.1
PKG_RELEASE:=2
PKG_RELEASE:=3
PKG_BUILD_DIR:=$(BUILD_DIR)/fff
@ -14,7 +14,7 @@ define Package/fff-base
DEFAULT:=y
TITLE:= Freifunk-Franken Base
URL:=http://www.freifunk-franken.de
DEPENDS:=+micrond
DEPENDS:=+micrond +fff-nodewatcher
endef
define Package/fff-base/description