mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-20 01:20:35 +08:00
Compare commits
3 Commits
8cb899e0fd
...
nev_7881
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
872208c573 | ||
|
|
9fe4bacc72 | ||
|
|
9065ad8ef2 |
@@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=map-topology
|
||||
PKG_VERSION:=3.2.13
|
||||
PKG_VERSION:=3.3.1
|
||||
|
||||
LOCAL_DEV:=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
@@ -26,6 +26,14 @@ define Package/map-topology
|
||||
CATEGORY:=Utilities
|
||||
DEPENDS:=+libubox +ubus +libpthread +libuci +libeasy \
|
||||
+libieee1905 +map-plugin +libavahi-nodbus-support
|
||||
SECTION:=utils
|
||||
TITLE:=Utility to build topology of a multi-AP network
|
||||
endef
|
||||
|
||||
define Package/topology
|
||||
CATEGORY:=Utilities
|
||||
DEPENDS:=+libubox +ubus +libpthread +libuci +libeasy
|
||||
SECTION:=utils
|
||||
TITLE:=Utility to build topology of a multi-AP network
|
||||
endef
|
||||
|
||||
@@ -38,6 +46,10 @@ define Package/map-topology/description
|
||||
Constructs network topology and show it as json structure over UBUS
|
||||
endef
|
||||
|
||||
define Package/topology/description
|
||||
Constructs network topology and show it as json structure over UBUS (without map dependency)
|
||||
endef
|
||||
|
||||
MAKE_PATH:=src
|
||||
|
||||
ifeq ($(LOCAL_DEV),1)
|
||||
@@ -46,10 +58,18 @@ define Build/Prepare
|
||||
endef
|
||||
endif
|
||||
|
||||
|
||||
define Package/map-topology/install
|
||||
$(CP) ./files/* $(1)/
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/topologyd $(1)/usr/sbin/
|
||||
endef
|
||||
|
||||
define Package/topology/install
|
||||
$(CP) ./files/* $(1)/
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/topologyd_singleap $(1)/usr/sbin/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,map-topology))
|
||||
$(eval $(call BuildPackage,topology))
|
||||
|
||||
@@ -65,6 +65,16 @@ validate_hosts_config() {
|
||||
}
|
||||
|
||||
start_service() {
|
||||
FILE=/usr/sbin/topologyd
|
||||
FILE_SINGLE_AP=/usr/sbin/topologyd_singleap
|
||||
if test -f "$FILE"; then
|
||||
start_topology
|
||||
elif test -f "$FILE_SINGLE_AP"; then
|
||||
start_topology_singleap
|
||||
fi
|
||||
}
|
||||
|
||||
start_topology() {
|
||||
config_load "topology"
|
||||
validate_topology_config || return 1;
|
||||
|
||||
@@ -79,6 +89,21 @@ start_service() {
|
||||
procd_close_instance
|
||||
}
|
||||
|
||||
start_topology_singleap() {
|
||||
config_load "topology"
|
||||
validate_topology_config || return 1;
|
||||
|
||||
config_load "hosts"
|
||||
validate_hosts_config || return 1;
|
||||
|
||||
procd_open_instance
|
||||
procd_set_param command "/usr/sbin/topologyd_singleap"
|
||||
procd_set_param respawn
|
||||
# procd_set_param stdout 1
|
||||
procd_set_param stderr 1
|
||||
procd_close_instance
|
||||
}
|
||||
|
||||
service_triggers()
|
||||
{
|
||||
procd_add_reload_trigger "network"
|
||||
|
||||
Reference in New Issue
Block a user