mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-10 07:44:50 +01:00
icwmp: run datamodel with micro-service
This commit is contained in:
parent
1700c3fa19
commit
8482cb4ddc
3 changed files with 24 additions and 2 deletions
|
|
@ -8,7 +8,7 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=icwmp
|
PKG_NAME:=icwmp
|
||||||
PKG_VERSION:=9.7.0
|
PKG_VERSION:=9.7.1
|
||||||
|
|
||||||
LOCAL_DEV:=0
|
LOCAL_DEV:=0
|
||||||
ifneq ($(LOCAL_DEV),1)
|
ifneq ($(LOCAL_DEV),1)
|
||||||
|
|
@ -48,6 +48,7 @@ define Package/icwmp/install
|
||||||
$(INSTALL_DIR) $(1)/etc/uci-defaults
|
$(INSTALL_DIR) $(1)/etc/uci-defaults
|
||||||
$(INSTALL_DIR) $(1)/lib/upgrade/keep.d
|
$(INSTALL_DIR) $(1)/lib/upgrade/keep.d
|
||||||
$(INSTALL_DIR) $(1)/etc/udhcpc.user.d
|
$(INSTALL_DIR) $(1)/etc/udhcpc.user.d
|
||||||
|
$(INSTALL_DIR) $(1)/etc/icwmpd/plugins
|
||||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/icwmpd $(1)/usr/sbin/icwmpd
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/icwmpd $(1)/usr/sbin/icwmpd
|
||||||
$(INSTALL_DATA) ./files/etc/config/cwmp $(1)/etc/config/cwmp
|
$(INSTALL_DATA) ./files/etc/config/cwmp $(1)/etc/config/cwmp
|
||||||
$(INSTALL_BIN) ./files/etc/firewall.cwmp $(1)/etc/firewall.cwmp
|
$(INSTALL_BIN) ./files/etc/firewall.cwmp $(1)/etc/firewall.cwmp
|
||||||
|
|
@ -58,8 +59,9 @@ define Package/icwmp/install
|
||||||
$(INSTALL_DATA) ./files/lib/upgrade/keep.d/icwmp $(1)/lib/upgrade/keep.d/icwmp
|
$(INSTALL_DATA) ./files/lib/upgrade/keep.d/icwmp $(1)/lib/upgrade/keep.d/icwmp
|
||||||
$(INSTALL_BIN) ./files/etc/udhcpc.user.d/udhcpc_icwmp_opt125.user $(1)/etc/udhcpc.user.d/udhcpc_icwmp_opt125.user
|
$(INSTALL_BIN) ./files/etc/udhcpc.user.d/udhcpc_icwmp_opt125.user $(1)/etc/udhcpc.user.d/udhcpc_icwmp_opt125.user
|
||||||
$(INSTALL_BIN) ./files/etc/udhcpc.user.d/udhcpc_icwmp_opt43.user $(1)/etc/udhcpc.user.d/udhcpc_icwmp_opt43.user
|
$(INSTALL_BIN) ./files/etc/udhcpc.user.d/udhcpc_icwmp_opt43.user $(1)/etc/udhcpc.user.d/udhcpc_icwmp_opt43.user
|
||||||
|
$(INSTALL_BIN) ./files/etc/icwmpd/input.json $(1)/etc/icwmpd/
|
||||||
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/libcwmpdm.so $(1)/etc/icwmpd/
|
||||||
$(call BbfdmInstallPlugin,$(1),./files/etc/bbfdm/json/CWMPManagementServer.json)
|
$(call BbfdmInstallPlugin,$(1),./files/etc/bbfdm/json/CWMPManagementServer.json)
|
||||||
$(call BbfdmInstallPlugin,$(1),$(PKG_BUILD_DIR)/libcwmpdm.so)
|
|
||||||
endef
|
endef
|
||||||
|
|
||||||
$(eval $(call BuildPackage,icwmp))
|
$(eval $(call BuildPackage,icwmp))
|
||||||
|
|
|
||||||
16
icwmp/files/etc/icwmpd/input.json
Normal file
16
icwmp/files/etc/icwmpd/input.json
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
{
|
||||||
|
"daemon": {
|
||||||
|
"input": {
|
||||||
|
"type": "DotSo",
|
||||||
|
"name": "/etc/icwmpd/libcwmpdm.so",
|
||||||
|
"plugin_dir": "/etc/icwmpd/plugins/"
|
||||||
|
},
|
||||||
|
"output": {
|
||||||
|
"type": "UBUS",
|
||||||
|
"name": "bbfdm.cwmp",
|
||||||
|
"parent_dm": "Device.",
|
||||||
|
"multiple_objects": [ "ManagementServer", "XMPP" ],
|
||||||
|
"root_obj": "bbfdm"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -6,9 +6,12 @@ STOP=00
|
||||||
|
|
||||||
USE_PROCD=1
|
USE_PROCD=1
|
||||||
PROG="/usr/sbin/icwmpd"
|
PROG="/usr/sbin/icwmpd"
|
||||||
|
CWMP_INPUT_JSON="/etc/icwmpd/input.json"
|
||||||
|
|
||||||
. /lib/functions.sh
|
. /lib/functions.sh
|
||||||
. /usr/share/libubox/jshn.sh
|
. /usr/share/libubox/jshn.sh
|
||||||
|
. /etc/bbfdm/bbfdm_services.sh
|
||||||
|
|
||||||
include /lib/network
|
include /lib/network
|
||||||
|
|
||||||
log() {
|
log() {
|
||||||
|
|
@ -514,6 +517,7 @@ boot() {
|
||||||
}
|
}
|
||||||
|
|
||||||
start_service() {
|
start_service() {
|
||||||
|
bbfdm_add_service "bbfdm.cwmp" "${CWMP_INPUT_JSON}"
|
||||||
|
|
||||||
procd_open_instance icwmp
|
procd_open_instance icwmp
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue