mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Disable reliability in interface for now, add partly support in OMR-Tracker
This commit is contained in:
parent
cc30b45eed
commit
3d500789f7
2 changed files with 8 additions and 3 deletions
|
@ -104,11 +104,12 @@ return view.extend({
|
|||
o.rmempty = false;
|
||||
o.modalonly = true;
|
||||
*/
|
||||
|
||||
/*
|
||||
o = s.option(form.Value, 'reliability', _('Tracking reliability'),
|
||||
_('Acceptable values: 1-100. This many Tracking IP addresses must respond for the link to be deemed up'));
|
||||
o.datatype = 'range(1, 100)';
|
||||
o.default = '1';
|
||||
*/
|
||||
|
||||
o = s.option(form.ListValue, 'count', _('Ping count'));
|
||||
o.default = '1';
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
. /lib/functions/network.sh
|
||||
|
||||
_validate_section() {
|
||||
local tmp_hosts=$hosts tmp_hosts6=$hosts6 tmp_timeout=$timeout tmp_count=$count tmp_tries=$tries tmp_size=$size tmp_max_ttl=$max_ttl tmp_failure_loss=$failure_loss tmp_failure_latency=$failure_latency tmp_recovery_loss=$recovery_loss tmp_recovery_latency=$recovery_latency
|
||||
local tmp_hosts=$hosts tmp_hosts6=$hosts6 tmp_timeout=$timeout tmp_count=$count tmp_tries=$tries tmp_size=$size tmp_max_ttl=$max_ttl tmp_failure_loss=$failure_loss tmp_failure_latency=$failure_latency tmp_recovery_loss=$recovery_loss tmp_recovery_latency=$recovery_latency tmp_reliability=$reliability
|
||||
local tmp_interval=$interval tmp_interval_tries=$interval_tries tmp_options=$options tmp_type=$type tmp_enabled=$enabled tmp_wait_test=$wait_test tmp_server_http_test=$server_http_test tmp_check_quality=$check_quality tmp_failure_interval=$failure_interval tmp_tries_up=$tries_up tmp_family=$family
|
||||
|
||||
uci_validate_section omr-tracker "$1" "$2" \
|
||||
|
@ -31,6 +31,7 @@ _validate_section() {
|
|||
'recovery_latency:uinteger' \
|
||||
'check_quality:bool:0' \
|
||||
'count:uinteger' \
|
||||
'reliability:uinteger' \
|
||||
'tries:uinteger' \
|
||||
'tries_up:uinteger' \
|
||||
'interval:uinteger' \
|
||||
|
@ -47,6 +48,7 @@ _validate_section() {
|
|||
[ -z "$hosts6" ] && hosts6=$tmp_hosts6
|
||||
[ -z "$timeout" ] && timeout=$tmp_timeout
|
||||
[ -z "$count" ] && count=$tmp_count
|
||||
[ -z "$reliability" ] && reliability=$tmp_reliability
|
||||
[ -z "$size" ] && size=$tmp_size
|
||||
[ -z "$failure_loss" ] && failure_loss=$tmp_failure_loss
|
||||
[ -z "$failure_latency" ] && failure_latency=$tmp_failure_latency
|
||||
|
@ -72,7 +74,7 @@ _launch_tracker() {
|
|||
loopback|lan*|if0*) return;;
|
||||
esac
|
||||
[ -z "$1" ] && return
|
||||
local hosts hosts6 timeout count tries tries_up interval interval_tries options type enabled wait_test ipv6 proto server_http_test size max_ttl failure_loss failure_interval failure_latency recovery_loss recovery_latency family
|
||||
local hosts hosts6 timeout count tries tries_up interval interval_tries options type enabled wait_test ipv6 proto server_http_test size max_ttl failure_loss failure_interval failure_latency recovery_loss recovery_latency family reliability
|
||||
_validate_section "defaults" "defaults"
|
||||
_validate_section "interface" "$1"
|
||||
|
||||
|
@ -105,6 +107,7 @@ _launch_tracker() {
|
|||
[ -z "${size}" ] && size=56
|
||||
[ -z "${check_quality}" ] && check_quality=0
|
||||
[ -z "${tries}" ] && tries=5
|
||||
[ -z "${reliability}" ] && reliability=1
|
||||
[ -z "${tries_up}" ] && tries_up=${tries}
|
||||
[ -z "${failure_interval}" ] && failure_interval=5
|
||||
|
||||
|
@ -122,6 +125,7 @@ _launch_tracker() {
|
|||
procd_append_param env "OMR_TRACKER_RECOVERY_LOSS=$recovery_loss"
|
||||
procd_append_param env "OMR_TRACKER_RECOVERY_LATENCY=$recovery_latency"
|
||||
procd_append_param env "OMR_TRACKER_COUNT=$count"
|
||||
procd_append_param env "OMR_TRACKER_RELIABILITY=$reliability"
|
||||
procd_append_param env "OMR_TRACKER_TRIES=$tries"
|
||||
procd_append_param env "OMR_TRACKER_TRIES_UP=$tries_up"
|
||||
procd_append_param env "OMR_TRACKER_INTERVAL=$interval"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue