mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-10 07:44:50 +01:00
bbfdm: delay start datamodel services
datamodel services moved down in startup sequence to avoid race conditions
This commit is contained in:
parent
6a34e2da97
commit
3ec6b54d46
3 changed files with 11 additions and 9 deletions
|
|
@ -5,7 +5,7 @@
|
|||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=bbfdm
|
||||
PKG_VERSION:=1.12.0
|
||||
PKG_VERSION:=1.12.1
|
||||
|
||||
USE_LOCAL:=0
|
||||
ifneq ($(USE_LOCAL),1)
|
||||
|
|
@ -53,7 +53,7 @@ define Package/dm-service
|
|||
CATEGORY:=Utilities
|
||||
SUBMENU:=TRx69
|
||||
TITLE:=Datamodel ubus backend to expose micro-service tree
|
||||
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json +libjson-c +libbbfdm-api +libbbfdm-ubus +jq +bbf_configmngr
|
||||
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json +libjson-c +libbbfdm-api +libbbfdm-ubus +bbf_configmngr
|
||||
endef
|
||||
|
||||
define Package/bbf_configmngr
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/sh /etc/rc.common
|
||||
|
||||
START=40
|
||||
START=85
|
||||
STOP=8
|
||||
|
||||
USE_PROCD=1
|
||||
|
|
@ -33,13 +33,17 @@ _add_microservice()
|
|||
name="$(basename ${path})"
|
||||
name="${name//.json}"
|
||||
|
||||
enable="$(jq -r '.daemon.enable//1' ${path})"
|
||||
json_load_file "${path}"
|
||||
json_select daemon
|
||||
|
||||
json_get_var enable enable 1
|
||||
if [ "${enable}" -eq "0" ]; then
|
||||
log "datamodel micro-service ${name} not enabled"
|
||||
return 0
|
||||
fi
|
||||
|
||||
loglevel="$(jq -r '.daemon.config.loglevel//3' ${path})"
|
||||
json_select config
|
||||
json_get_var loglevel loglevel 3
|
||||
|
||||
procd_open_instance "${name}"
|
||||
|
||||
|
|
@ -59,7 +63,7 @@ _add_microservice()
|
|||
|
||||
configure_bbfdm_micro_services()
|
||||
{
|
||||
local enable enable_core enable_respawn
|
||||
local enable enable_core
|
||||
|
||||
config_load bbfdm
|
||||
validate_bbfdm_micro_service_section || {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/sh /etc/rc.common
|
||||
|
||||
START=65
|
||||
START=90
|
||||
STOP=10
|
||||
|
||||
USE_PROCD=1
|
||||
|
|
@ -44,8 +44,6 @@ configure_bbfdmd()
|
|||
|
||||
start_service()
|
||||
{
|
||||
mkdir -p ${BBFDM_TEMP_DIR}
|
||||
|
||||
procd_open_instance "bbfdm"
|
||||
configure_bbfdmd
|
||||
procd_set_param respawn
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue