summaryrefslogtreecommitdiff
path: root/init.cfg
diff options
context:
space:
mode:
Diffstat (limited to 'init.cfg')
-rw-r--r--init.cfg4
1 files changed, 3 insertions, 1 deletions
diff --git a/init.cfg b/init.cfg
index 7976b6166..33122cc69 100644
--- a/init.cfg
+++ b/init.cfg
@@ -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