obuspa: Align role_name with uci

This commit is contained in:
vdutta 2021-05-20 22:34:11 +05:30
parent c7ae8699ca
commit ae23f756ec
3 changed files with 8 additions and 8 deletions

View file

@ -5,12 +5,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=obuspa
PKG_VERSION:=4.0.0.1
PKG_VERSION:=4.0.0.2
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=8894e7432605dfb7fb48e45bf518b7020a372243
PKG_SOURCE_VERSION:=fefad332780c615168d96687f6d854703b04ec6f
PKG_SOURCE_URL:=https://dev.iopsys.eu/fork/obuspa.git
PKG_MAINTAINER:=Vivek Dutta <vivek.dutta@iopsys.eu>
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz

View file

@ -19,7 +19,7 @@ config controller 'localcontroller'
option Protocol 'MQTT'
option Topic '/usp/controller'
option mqtt 'localmqtt'
option assigned_role_name 'Full Access'
option assigned_role_name 'full_access'
# Adds Device.LocalAgent.MTP.
config mtp
@ -45,7 +45,7 @@ config subscription
#config challenge 'admin'
# option Description 'Request to get Administrative access'
# option role_name 'Full Access'
# option role_name 'full_access'
# option Enable '1'
# option Value 'admin'
# option Retries 2

View file

@ -107,11 +107,11 @@ validate_obuspa_section()
'trust_cert:file' \
'client_cert:file' \
'interface:string' \
'ifname:string:"br-lan"' \
'ifname:string:br-lan' \
'debug:bool:false' \
'log_level:uinteger' \
'log_dest:file' \
'db_file:file' \
'log_dest:string' \
'db_file:string' \
'role_file:file'
}
@ -367,7 +367,7 @@ get_role_index() {
local role_name="${@}"
case "${role_name}" in
'Full Access')
'full_access')
index=1;
;;
'Untrusted')