mirror of
https://github.com/deajan/obackup.git
synced 2025-01-12 23:23:53 +01:00
Removed unused IFS statements
This commit is contained in:
parent
81c9ddf202
commit
f7a3c4b3f0
@ -1,6 +1,6 @@
|
|||||||
#### MINIMAL-FUNCTION-SET BEGIN ####
|
#### 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
|
## 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
|
#TODO: set _LOGGER_PREFIX in other apps, specially for osync daemon mode
|
||||||
@ -968,26 +968,17 @@ function CheckConnectivity3rdPartyHosts {
|
|||||||
|
|
||||||
if [ "$REMOTE_3RD_PARTY_HOSTS" != "" ]; then
|
if [ "$REMOTE_3RD_PARTY_HOSTS" != "" ]; then
|
||||||
remote_3rd_party_success=0
|
remote_3rd_party_success=0
|
||||||
OLD_IFS=$IFS
|
|
||||||
IFS=$' \t\n'
|
|
||||||
for i in $REMOTE_3RD_PARTY_HOSTS
|
for i in $REMOTE_3RD_PARTY_HOSTS
|
||||||
do
|
do
|
||||||
eval "$PING_CMD $i > /dev/null 2>&1" &
|
eval "$PING_CMD $i > /dev/null 2>&1" &
|
||||||
if [ "$pids" == "" ]; then
|
WaitForTaskCompletion $! 10 360 ${FUNCNAME[0]} false true
|
||||||
pids="$!"
|
if [ $? != 0 ]; then
|
||||||
|
Logger "Cannot ping 3rd party host $i" "NOTICE"
|
||||||
else
|
else
|
||||||
pids="$pids;$!"
|
remote_3rd_party_success=1
|
||||||
fi
|
fi
|
||||||
done
|
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
|
if [ $remote_3rd_party_success -ne 1 ]; then
|
||||||
Logger "No remote 3rd party host responded to ping. No internet ?" "ERROR"
|
Logger "No remote 3rd party host responded to ping. No internet ?" "ERROR"
|
||||||
return 1
|
return 1
|
||||||
|
Loading…
Reference in New Issue
Block a user