added workaround for "test" cmd - return code !=0 OK
This commit is contained in:
parent
a688cedd11
commit
bef210ca6c
@ -14,8 +14,9 @@ function g_retrycmd {
|
||||
((g_try=g_try+1))
|
||||
#>&2 echo "$(g_date_print) Try $g_try of $g_tries"
|
||||
echo "$@" >$g_tmp/g_retrycmd.cmd
|
||||
bash $g_tmp/g_retrycmd.cmd && break
|
||||
bash $g_tmp/g_retrycmd.cmd && return 0
|
||||
g_return=$?
|
||||
grep -q "test " $g_tmp/g_retrycmd.cmd && return 0
|
||||
if [ $g_try -eq $g_tries ]
|
||||
then
|
||||
[ -z "$g_return" ] || g_echo_error "${FUNCNAME}: $@ failed all $g_tries tries"
|
||||
@ -24,5 +25,5 @@ function g_retrycmd {
|
||||
sleep $g_tries_delay
|
||||
done
|
||||
|
||||
return 0
|
||||
return ${g_return}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user