diff --git a/obuspa/Makefile b/obuspa/Makefile index ac09be3b0..993e53fd2 100644 --- a/obuspa/Makefile +++ b/obuspa/Makefile @@ -5,12 +5,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=obuspa -PKG_VERSION:=4.1.0.11 +PKG_VERSION:=4.1.0.12 LOCAL_DEV:=0 ifneq ($(LOCAL_DEV),1) PKG_SOURCE_PROTO:=git -PKG_SOURCE_VERSION:=a52205791ef71cb54fa468064075ff85c7f5a638 +PKG_SOURCE_VERSION:=5fee30756165c275cc126509076acb716e15e1b1 PKG_SOURCE_URL:=https://dev.iopsys.eu/fork/obuspa.git PKG_MAINTAINER:=Vivek Dutta PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz diff --git a/obuspa/files/etc/config/obuspa b/obuspa/files/etc/config/obuspa index 8792d4d8c..e93373b0a 100644 --- a/obuspa/files/etc/config/obuspa +++ b/obuspa/files/etc/config/obuspa @@ -4,6 +4,7 @@ config obuspa 'global' #option ifname 'lo' option debug '1' option log_level '1' + option prototrace '0' #option db_file '/etc/obuspa/usp.db' #option role_file '/etc/obuspa/roles.json' option dm_caching_exclude '/etc/obuspa/dmcaching_exclude.json' diff --git a/obuspa/files/etc/init.d/obuspa b/obuspa/files/etc/init.d/obuspa index 6d1054023..925bbc5f7 100755 --- a/obuspa/files/etc/init.d/obuspa +++ b/obuspa/files/etc/init.d/obuspa @@ -123,6 +123,7 @@ validate_obuspa_section() 'interface:string' \ 'ifname:string:br-lan' \ 'debug:bool:false' \ + 'prototrace:bool:false' \ 'log_level:uinteger' \ 'log_dest:string' \ 'db_file:string' \ @@ -250,8 +251,8 @@ publish_endpoint() { opt="${opt} -P ${pass}" fi - # publish Agent's EndpointID in mosquito broker for discovery - # This is a work around till obuspa does not support advertising + # publish Agent's EndpointID in mosquito broker for discovery by usp-js + # This is a work around till obuspa support advertising log "Publishing EndpointID ${AgentEndpointID} to local mqtt broker" mosquitto_pub -r -t "obuspa/EndpointID" -m "${AgentEndpointID}" ${opt} } @@ -602,7 +603,7 @@ configure_mqtt_client(){ 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" || { log "Validation of global section failed" @@ -616,10 +617,13 @@ configure_obuspa() { procd_set_param stdout 1 # Same for stderr procd_set_param stderr 1 + fi + + if [ "${debug}" -eq 1 -a "${prototrace}" -eq 1 ]; then procd_append_param command -p fi - if [ -n ${log_level} ]; then + if [ "${debug}" -eq 1 -a -n "${log_level}" ]; then procd_append_param command -v ${log_level} fi