diff options
Diffstat (limited to 'init.cfg')
-rw-r--r-- | init.cfg | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -556,11 +556,13 @@ working_umask_or_skip_() # Note ensure you do _not_ quote the parameter to GNU sleep in # your function, as it may contain separate values that sleep # needs to accumulate. +# Further function arguments will be forwarded to the test function. retry_delay_() { local test_func=$1 local init_delay=$2 local max_n_tries=$3 + shift 3 || return 1 local attempt=1 local num_sleeps=$attempt @@ -568,7 +570,7 @@ retry_delay_() while test $attempt -le $max_n_tries; do local delay=$($AWK -v n=$num_sleeps -v s="$init_delay" \ 'BEGIN { print s * n }') - "$test_func" "$delay" && { time_fail=0; break; } || time_fail=1 + "$test_func" "$delay" "$@" && { time_fail=0; break; } || time_fail=1 attempt=$(expr $attempt + 1) num_sleeps=$(expr $num_sleeps '*' 2) done |