timemngr: align with datamodel microservice

This commit is contained in:
Vivek Kumar Dutta 2024-03-12 18:56:43 +05:30
parent e21a57e76c
commit 1e4c3cec94
3 changed files with 7 additions and 13 deletions

View file

@ -5,7 +5,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=timemngr
PKG_VERSION:=1.0.14
PKG_VERSION:=1.0.15
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
@ -20,6 +20,7 @@ PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE
include $(INCLUDE_DIR)/package.mk
include $(TOPDIR)/feeds/iopsys/bbfdm/bbfdm.mk
#RSTRIP:=:
@ -56,12 +57,11 @@ define Package/$(PKG_NAME)/install
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_DIR) $(1)/etc/uci-defaults
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/timemngr $(1)/usr/sbin/timemngr
$(INSTALL_DATA) $(PKG_BUILD_DIR)/src/libtimemngr.so $(1)/etc/timemngr/
$(INSTALL_DATA) ./files/etc/timemngr/input.json $(1)/etc/timemngr/
$(call BbfdmInstallPluginInMicroservice,$(1)/etc/timemngr,$(PKG_BUILD_DIR)/src/libtimemngr.so)
$(call BbfdmInstallMicroServiceInputFile,$(1),./files/etc/timemngr/input.json)
$(INSTALL_BIN) ./files/etc/hotplug.d/iface/21-timemngr $(1)/etc/hotplug.d/iface/
$(INSTALL_BIN) ./files/etc/hotplug.d/ntp/40-firstUseDate $(1)/etc/hotplug.d/ntp/
$(INSTALL_BIN) ./files/etc/init.d/timemngr $(1)/etc/init.d/
$(INSTALL_BIN) ./files/etc/uci-defaults/50_add_timemngr_dm_microservice $(1)/etc/uci-defaults/
ifeq ($(CONFIG_TIMEMNGR_MIGRATE_SYSTEM),y)
$(INSTALL_BIN) ./files/etc/uci-defaults/96-system-ntp-migrate $(1)/etc/uci-defaults/
endif

View file

@ -1,12 +1,14 @@
{
"daemon": {
"config": {
"loglevel": "1"
},
"input": {
"type": "DotSo",
"name": "/etc/timemngr/libtimemngr.so"
},
"output": {
"type": "UBUS",
"name": "bbfdm.time",
"parent_dm": "Device.",
"object": "Time",
"root_obj": "bbfdm"

View file

@ -1,8 +0,0 @@
#!/bin/sh
if ! uci -q get bbfdm.timemngr > /dev/null; then
uci set bbfdm.timemngr=micro_service
uci set bbfdm.timemngr.enable=1
uci set bbfdm.timemngr.input_json="/etc/timemngr/input.json"
uci set bbfdm.timemngr.loglevel=1
fi