diff --git a/map-agent/Makefile b/map-agent/Makefile index ba2bbba01..87b45a3b1 100644 --- a/map-agent/Makefile +++ b/map-agent/Makefile @@ -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 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)) diff --git a/map-agent/files/etc/init.d/mapagent b/map-agent/files/etc/init.d/mapagent index 74a4912aa..8f7717d94 100755 --- a/map-agent/files/etc/init.d/mapagent +++ b/map-agent/files/etc/init.d/mapagent @@ -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