diff --git a/extra/resources/ping b/extra/resources/ping index 76a45a8cdcb..4ddf6bdcfb2 100755 --- a/extra/resources/ping +++ b/extra/resources/ping @@ -241,34 +241,49 @@ fping_check() { 99) ocf_log err "Ambiguous IP versions in host_list: '$OCF_RESKEY_host_list'"; exit $OCF_ERR_CONFIGURED;; esac - active=0 - f_out=`mktemp` - f_err=`mktemp` - if [ ! -f "$f_out" ] || [ ! -f "$f_err" ]; then - ocf_log err "Failed to create temporary files for fping output; is /tmp full?" - exit $OCF_ERR_PERM - fi - - n=$OCF_RESKEY_attempts - timeout=`expr $OCF_RESKEY_timeout \* 1000 / $OCF_RESKEY_attempts` - - cmd="$p_exe -r $OCF_RESKEY_attempts -t $timeout -B 1.0 $OCF_RESKEY_options $OCF_RESKEY_host_list" - $cmd>$f_out 2>$f_err; rc=$? - active=`grep alive $f_out|wc -l` + outp=$(python <