diff --git a/nodemgmt-scripts.sh b/nodemgmt-scripts.sh index 041b8bbb..9d19c32f 100755 --- a/nodemgmt-scripts.sh +++ b/nodemgmt-scripts.sh @@ -209,19 +209,18 @@ STATUS-CHECK(){ else checked="`ssh root@10.5.10.51 \"ssh root@${nip} \"cat ${REPL_CHECKS[${rcheck}]}/test.repl\" | diff - ${REPL_CHECKS[${rcheck}]}/test.repl\"`" fi - if [ `date +%s` -gt $timeout ]; then + if [ "`date +%s`" -gt "$timeout" ]; then timeout=true break fi done if [ "${timeout}" != "true" ]; then rm -f ${FOLDER}/${nip}-${rcheck}.down - elif [ ! -f ${FOLDER}/${nip}-${rcheck}.down ]; then + else touch ${FOLDER}/${nip}-${rcheck}.down echo "Timeout occurred in waiting for replication between primary node and iDS-Node${nid} (${nip}) for the replicated folder of '${rcheck}'." | mail -s "Status-Check" ${STATUS_CHECK_EMAIL} fi done - echo fi nid=`expr $nid + 1` done