mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-10 07:44:50 +01:00
hostmngr: 1.0.1: Add support for Hosts Data Model
This commit is contained in:
parent
7db489d987
commit
ba6a218a09
3 changed files with 28 additions and 3 deletions
|
|
@ -5,12 +5,12 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=hostmngr
|
PKG_NAME:=hostmngr
|
||||||
PKG_VERSION:=1.0.0
|
PKG_VERSION:=1.0.1
|
||||||
|
|
||||||
LOCAL_DEV=0
|
LOCAL_DEV=0
|
||||||
ifneq ($(LOCAL_DEV),1)
|
ifneq ($(LOCAL_DEV),1)
|
||||||
PKG_SOURCE_PROTO:=git
|
PKG_SOURCE_PROTO:=git
|
||||||
PKG_SOURCE_VERSION:=7561f11b8b7eaee554f5c047b02a292099e92564
|
PKG_SOURCE_VERSION:=d45a43465f65a0d1b8ee7c45e175e1300b811468
|
||||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/hostmngr.git
|
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/hostmngr.git
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
|
||||||
PKG_MIRROR_HASH:=skip
|
PKG_MIRROR_HASH:=skip
|
||||||
|
|
@ -58,7 +58,10 @@ MAKE_PATH:=src
|
||||||
define Package/hostmngr/install
|
define Package/hostmngr/install
|
||||||
$(CP) ./files/* $(1)/
|
$(CP) ./files/* $(1)/
|
||||||
$(INSTALL_DIR) $(1)/usr/sbin
|
$(INSTALL_DIR) $(1)/usr/sbin
|
||||||
|
$(INSTALL_DIR) $(1)/etc/hostmngr/
|
||||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/hostmngr $(1)/usr/sbin/
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/hostmngr $(1)/usr/sbin/
|
||||||
|
$(INSTALL_DATA) $(PKG_BUILD_DIR)/src/bbf_plugin/libhostmngr.so $(1)/etc/hostmngr/
|
||||||
|
$(INSTALL_DATA) ./files/etc/hostmngr/input.json $(1)/etc/hostmngr/
|
||||||
endef
|
endef
|
||||||
|
|
||||||
ifeq ($(LOCAL_DEV),1)
|
ifeq ($(LOCAL_DEV),1)
|
||||||
|
|
|
||||||
16
hostmngr/files/etc/hostmngr/input.json
Normal file
16
hostmngr/files/etc/hostmngr/input.json
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
{
|
||||||
|
"daemon": {
|
||||||
|
"input": {
|
||||||
|
"type": "DotSo",
|
||||||
|
"name": "/etc/hostmngr/libhostmngr.so"
|
||||||
|
},
|
||||||
|
"output": {
|
||||||
|
"type": "UBUS",
|
||||||
|
"name": "bbfdm.hosts",
|
||||||
|
"parent_dm": "Device.",
|
||||||
|
"object": "Hosts",
|
||||||
|
"root_obj": "bbfdm"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -3,16 +3,22 @@
|
||||||
START=97
|
START=97
|
||||||
STOP=20
|
STOP=20
|
||||||
|
|
||||||
|
. /etc/bbfdm/bbfdm_services.sh
|
||||||
|
|
||||||
USE_PROCD=1
|
USE_PROCD=1
|
||||||
|
|
||||||
|
HOSTS_JSON_INPUT="/etc/hostmngr/input.json"
|
||||||
|
|
||||||
start_service() {
|
start_service() {
|
||||||
procd_open_instance
|
procd_open_instance
|
||||||
procd_set_param command "/usr/sbin/hostmngr" "--config hosts" "-o" "/tmp/hostmngr.log" "-f"
|
procd_set_param command "/usr/sbin/hostmngr" "--config hosts" "-o" "/tmp/hostmngr.log" "-f"
|
||||||
# procd_set_param respawn
|
# procd_set_param respawn
|
||||||
procd_set_param limits core="unlimited"
|
procd_set_param limits core="unlimited"
|
||||||
# procd_set_param stdout 1
|
# procd_set_param stdout 1
|
||||||
# procd_set_param stderr 1
|
# procd_set_param stderr 1
|
||||||
procd_close_instance
|
procd_close_instance
|
||||||
|
|
||||||
|
bbfdm_add_service "bbfdm.hosts" "${HOSTS_JSON_INPUT}"
|
||||||
}
|
}
|
||||||
|
|
||||||
service_triggers()
|
service_triggers()
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue