bbfdm: Remove transaction APIs

This commit is contained in:
Amin Ben Romdhane 2024-08-09 09:41:34 +02:00 committed by Vivek Kumar Dutta
parent 1ad9254588
commit 8619514bdb
4 changed files with 14 additions and 8 deletions

View file

@ -5,13 +5,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=bbfdm
PKG_VERSION:=1.10.0
PKG_VERSION:=1.10.1
USE_LOCAL:=0
ifneq ($(USE_LOCAL),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/bbf/bbfdm.git
PKG_SOURCE_VERSION:=75195a112e3aef2b07e224afbbffcb15368be58f
PKG_SOURCE_VERSION:=fa69524868b747c9f1731f9eb3b7027d74069591
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif

View file

@ -1,8 +1,6 @@
config bbfdmd 'bbfdmd'
option enable '1'
option loglevel '1'
option refresh_time '120'
option transaction_timeout '30'
option loglevel '3'
option subprocess_level '2'
config micro_services 'micro_services'

View file

@ -6,10 +6,20 @@ STOP=10
USE_PROCD=1
PROG=/usr/sbin/bbf_configd
create_needed_directories()
{
mkdir -p /tmp/bbfdm/.cwmp
mkdir -p /tmp/bbfdm/.usp
mkdir -p /tmp/bbfdm/.bbfdm
}
start_service()
{
create_needed_directories
procd_open_instance "bbf_configd"
procd_set_param command ${PROG}
#procd_append_param command -d
procd_set_param respawn
procd_close_instance "bbf_configd"
}

View file

@ -22,8 +22,6 @@ validate_bbfdm_bbfdmd_section()
'sock:string' \
'debug:bool:false' \
'loglevel:uinteger:1' \
'refresh_time:uinteger:0' \
'transaction_timeout:uinteger:30' \
'subprocess_level:uinteger'
}
@ -41,7 +39,7 @@ configure_bbfdmd()
[ "${enable}" -eq 0 ] && return 0
if [ -f "${BBFDM_JSON_INPUT}" ]; then
echo "$(jq --arg log ${loglevel} --arg tran ${transaction_timeout} --arg refresh ${refresh_time} --arg level ${subprocess_level} '.daemon.config += {"loglevel": $log, "refresh_time": $refresh, "transaction_timeout": $tran, "subprocess_level": $level}' ${BBFDM_JSON_INPUT})" > "${BBFDM_TEMP_DIR}/input.json"
echo "$(jq --arg log ${loglevel} --arg level ${subprocess_level} '.daemon.config += {"loglevel": $log, "subprocess_level": $level}' ${BBFDM_JSON_INPUT})" > "${BBFDM_TEMP_DIR}/input.json"
fi
procd_set_param command ${PROG}