map-agent: 6.3.0: introduce dynbhd

This commit is contained in:
Jakob Olsson 2021-12-10 13:13:08 +01:00
parent 53ab41ea2f
commit 63ba56b87e
2 changed files with 38 additions and 2 deletions

View file

@ -5,9 +5,9 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=map-agent
PKG_VERSION:=6.2.12
PKG_VERSION:=6.3.0
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=2d3241eb4bfbdc1c9f7eef62a7e3e26fbbaf4014
PKG_SOURCE_VERSION:=a20f0732efb2efd63a694cadb0711471f4a6c6c6
PKG_MAINTAINER:=Anjan Chanda <anjan.chanda@iopsys.eu>
PKG_LICENSE:=PROPRIETARY IOPSYS
@ -33,10 +33,24 @@ define Package/map-agent
+map-plugin
endef
define Package/dynbhd
SECTION:=utils
CATEGORY:=Utilities
TITLE:=Dynamic Backhaul Daemon
DEPENDS:=+libwifi +libuci +libubox +ubus +libeasy +libieee1905 +ieee1905 \
+map-plugin +map-agent
endef
define Package/map-agent/description
This package implements EasyMesh R2 compliant WiFi Agent.
endef
define Package/dynbhd/description
Dyanmic LAN/WAN port detection and loop avoidance.
endef
define Package/map-agent/config
#source "$(SOURCE)/Config.in"
endef
@ -56,6 +70,16 @@ define Package/map-agent/install
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/mapagent $(1)/usr/sbin/
endef
define Package/dynbhd/install
$(INSTALL_DIR) $(1)/etc
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_DIR) $(1)/lib/wifi/dynbhd
$(INSTALL_DIR) $(1)/etc/hotplug.d/ethernet
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/linkwatcher/linkwatchd $(1)/usr/sbin/dynbhd
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/linkwatcher/api $(1)/lib/wifi/dynbhd/api
# $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/linkwatcher/map-dynamic-backhaul $(1)/etc/hotplug.d/ethernet/map-dynamic-backhaul
endef
ifeq ($(LOCAL_DEV),1)
define Build/Prepare
rsync -r --exclude=.* ~/git/map-agent/ $(PKG_BUILD_DIR)/
@ -63,3 +87,4 @@ endef
endif
$(eval $(call BuildPackage,map-agent))
$(eval $(call BuildPackage,dynbhd))

View file

@ -46,7 +46,18 @@ remove_map() {
ubus call network reload
}
start_dynbhd_service() {
procd_open_instance
procd_set_param command "/usr/sbin/dynbhd"
procd_set_param respawn
# procd_set_param stdout 1
# procd_set_param stderr 1
procd_close_instance
}
start_service() {
[ -f /usr/sbin/dynbhd ] && start_dynbhd_service
config_load "mapagent"
ubus -t 5 wait_for wifi