From f7a3c4b3f084412869c7090b0d26a602337e14c0 Mon Sep 17 00:00:00 2001 From: deajan Date: Mon, 8 Aug 2016 16:32:06 +0200 Subject: [PATCH] Removed unused IFS statements --- dev/ofunctions.sh | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/dev/ofunctions.sh b/dev/ofunctions.sh index cd2b758..309ea1d 100644 --- a/dev/ofunctions.sh +++ b/dev/ofunctions.sh @@ -1,6 +1,6 @@ #### MINIMAL-FUNCTION-SET BEGIN #### -## FUNC_BUILD=2016080805 +## FUNC_BUILD=2016080806 ## BEGIN Generic functions for osync & obackup written in 2013-2016 by Orsiris de Jong - http://www.netpower.fr - ozy@netpower.fr #TODO: set _LOGGER_PREFIX in other apps, specially for osync daemon mode @@ -968,26 +968,17 @@ function CheckConnectivity3rdPartyHosts { if [ "$REMOTE_3RD_PARTY_HOSTS" != "" ]; then remote_3rd_party_success=0 - OLD_IFS=$IFS - IFS=$' \t\n' for i in $REMOTE_3RD_PARTY_HOSTS do eval "$PING_CMD $i > /dev/null 2>&1" & - if [ "$pids" == "" ]; then - pids="$!" + WaitForTaskCompletion $! 10 360 ${FUNCNAME[0]} false true + if [ $? != 0 ]; then + Logger "Cannot ping 3rd party host $i" "NOTICE" else - pids="$pids;$!" + remote_3rd_party_success=1 fi done - WaitForTaskCompletion $pids 10 360 ${FUNCNAME[0]} false true - if [ $? != 0 ]; then - Logger "Cannot ping 3rd party host $i" "NOTICE" - else - remote_3rd_party_success=1 - fi - - IFS=$OLD_IFS if [ $remote_3rd_party_success -ne 1 ]; then Logger "No remote 3rd party host responded to ping. No internet ?" "ERROR" return 1