ubox: add a flag that allows us to disable remote log while keeping the ip settings inside uci

this makes webui foo a lot easier

Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 41439
This commit is contained in:
John Crispin 2014-07-01 10:26:10 +00:00
parent bf75e37030
commit ea535a9565

View file

@ -15,6 +15,7 @@ validate_log_section()
'log_file:string' \ 'log_file:string' \
'log_size:uinteger' \ 'log_size:uinteger' \
'log_ip:ipaddr' \ 'log_ip:ipaddr' \
'log_remote:bool:1' \
'log_port:port:514' \ 'log_port:port:514' \
'log_proto:or("tcp", "udp"):udp' \ 'log_proto:or("tcp", "udp"):udp' \
'log_prefix:string' 'log_prefix:string'
@ -64,12 +65,13 @@ start_service_remote()
{ {
PIDCOUNT="$(( ${PIDCOUNT} + 1))" PIDCOUNT="$(( ${PIDCOUNT} + 1))"
local pid_file="/var/run/logread.${PIDCOUNT}.pid" local pid_file="/var/run/logread.${PIDCOUNT}.pid"
local log_ip log_port log_proto log_prefix local log_ip log_port log_proto log_prefix log_remote
validate_log_section "${1}" || { validate_log_section "${1}" || {
echo "validation failed" echo "validation failed"
return 1 return 1
} }
[ "${log_enable}" -ne 0 ] || return
[ -z "${log_ip}" ] && return [ -z "${log_ip}" ] && return
procd_open_instance procd_open_instance