mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-10 07:44:50 +01:00
obuspa: Updated uci schema
- prototrace uci option to enable protocol trace - Added BootParamName for controller boot parameters
This commit is contained in:
parent
c5654ad9ab
commit
927b002aa6
3 changed files with 11 additions and 6 deletions
|
|
@ -5,12 +5,12 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=obuspa
|
PKG_NAME:=obuspa
|
||||||
PKG_VERSION:=4.1.0.11
|
PKG_VERSION:=4.1.0.12
|
||||||
|
|
||||||
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:=a52205791ef71cb54fa468064075ff85c7f5a638
|
PKG_SOURCE_VERSION:=5fee30756165c275cc126509076acb716e15e1b1
|
||||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/fork/obuspa.git
|
PKG_SOURCE_URL:=https://dev.iopsys.eu/fork/obuspa.git
|
||||||
PKG_MAINTAINER:=Vivek Dutta <vivek.dutta@iopsys.eu>
|
PKG_MAINTAINER:=Vivek Dutta <vivek.dutta@iopsys.eu>
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ config obuspa 'global'
|
||||||
#option ifname 'lo'
|
#option ifname 'lo'
|
||||||
option debug '1'
|
option debug '1'
|
||||||
option log_level '1'
|
option log_level '1'
|
||||||
|
option prototrace '0'
|
||||||
#option db_file '/etc/obuspa/usp.db'
|
#option db_file '/etc/obuspa/usp.db'
|
||||||
#option role_file '/etc/obuspa/roles.json'
|
#option role_file '/etc/obuspa/roles.json'
|
||||||
option dm_caching_exclude '/etc/obuspa/dmcaching_exclude.json'
|
option dm_caching_exclude '/etc/obuspa/dmcaching_exclude.json'
|
||||||
|
|
|
||||||
|
|
@ -123,6 +123,7 @@ validate_obuspa_section()
|
||||||
'interface:string' \
|
'interface:string' \
|
||||||
'ifname:string:br-lan' \
|
'ifname:string:br-lan' \
|
||||||
'debug:bool:false' \
|
'debug:bool:false' \
|
||||||
|
'prototrace:bool:false' \
|
||||||
'log_level:uinteger' \
|
'log_level:uinteger' \
|
||||||
'log_dest:string' \
|
'log_dest:string' \
|
||||||
'db_file:string' \
|
'db_file:string' \
|
||||||
|
|
@ -250,8 +251,8 @@ publish_endpoint() {
|
||||||
opt="${opt} -P ${pass}"
|
opt="${opt} -P ${pass}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# publish Agent's EndpointID in mosquito broker for discovery
|
# publish Agent's EndpointID in mosquito broker for discovery by usp-js
|
||||||
# This is a work around till obuspa does not support advertising
|
# This is a work around till obuspa support advertising
|
||||||
log "Publishing EndpointID ${AgentEndpointID} to local mqtt broker"
|
log "Publishing EndpointID ${AgentEndpointID} to local mqtt broker"
|
||||||
mosquitto_pub -r -t "obuspa/EndpointID" -m "${AgentEndpointID}" ${opt}
|
mosquitto_pub -r -t "obuspa/EndpointID" -m "${AgentEndpointID}" ${opt}
|
||||||
}
|
}
|
||||||
|
|
@ -602,7 +603,7 @@ configure_mqtt_client(){
|
||||||
|
|
||||||
|
|
||||||
configure_obuspa() {
|
configure_obuspa() {
|
||||||
local enabled trust_cert ifname interface debug log_level db_file log_dest role_file
|
local enabled trust_cert ifname interface debug prototrace log_level db_file log_dest role_file
|
||||||
|
|
||||||
validate_obuspa_section "global" || {
|
validate_obuspa_section "global" || {
|
||||||
log "Validation of global section failed"
|
log "Validation of global section failed"
|
||||||
|
|
@ -616,10 +617,13 @@ configure_obuspa() {
|
||||||
procd_set_param stdout 1
|
procd_set_param stdout 1
|
||||||
# Same for stderr
|
# Same for stderr
|
||||||
procd_set_param stderr 1
|
procd_set_param stderr 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "${debug}" -eq 1 -a "${prototrace}" -eq 1 ]; then
|
||||||
procd_append_param command -p
|
procd_append_param command -p
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n ${log_level} ]; then
|
if [ "${debug}" -eq 1 -a -n "${log_level}" ]; then
|
||||||
procd_append_param command -v ${log_level}
|
procd_append_param command -v ${log_level}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue