Fixed typos
This commit is contained in:
parent
c1235d2a55
commit
a9ae4f50ad
12
osync.sh
12
osync.sh
|
@ -4,7 +4,7 @@ PROGRAM="Osync" # Rsync based two way sync engine with fault tolerance
|
||||||
AUTHOR="(L) 2013-2015 by Orsiris \"Ozy\" de Jong"
|
AUTHOR="(L) 2013-2015 by Orsiris \"Ozy\" de Jong"
|
||||||
CONTACT="http://www.netpower.fr/osync - ozy@netpower.fr"
|
CONTACT="http://www.netpower.fr/osync - ozy@netpower.fr"
|
||||||
PROGRAM_VERSION=1.1-unstable
|
PROGRAM_VERSION=1.1-unstable
|
||||||
PROGRAM_BUILD=2015091204
|
PROGRAM_BUILD=2015091205
|
||||||
|
|
||||||
## type doesn't work on platforms other than linux (bash). If if doesn't work, always assume output is not a zero exitcode
|
## type doesn't work on platforms other than linux (bash). If if doesn't work, always assume output is not a zero exitcode
|
||||||
if ! type -p "$BASH" > /dev/null; then
|
if ! type -p "$BASH" > /dev/null; then
|
||||||
|
@ -843,11 +843,11 @@ function CheckReplicaPaths {
|
||||||
# fi
|
# fi
|
||||||
#fi
|
#fi
|
||||||
|
|
||||||
_CheckReplicaPathsLocal "$INITIATOR_STATE_DIR"
|
_CheckReplicaPathsLocal "$INITIATOR_SYNC_DIR"
|
||||||
if [ "$REMOTE_SYNC" == "no" ]; then
|
if [ "$REMOTE_SYNC" == "no" ]; then
|
||||||
_CheckReplicaPathsLocal "$TARGET_STATE_DIR"
|
_CheckReplicaPathsLocal "$TARGET_SYNC_DIR"
|
||||||
else
|
else
|
||||||
_CheckReplicaPathsRemote "$TARGET_STATE_DIR"
|
_CheckReplicaPathsRemote "$TARGET_SYNC_DIR"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -872,12 +872,12 @@ function _CheckDiskSpaceRemote {
|
||||||
CheckConnectivity3rdPartyHosts
|
CheckConnectivity3rdPartyHosts
|
||||||
CheckConnectivityRemoteHost
|
CheckConnectivityRemoteHost
|
||||||
|
|
||||||
cmd="$SSH_CMD \"$COMMAND_SUDO df -P \\\"$replca_path\\\"\" > $RUN_DIR/osync_$FUNCNAME_$SCRIPT_PID 2>&1 &"
|
cmd="$SSH_CMD \"$COMMAND_SUDO df -P \\\"$replica_path\\\"\" > $RUN_DIR/osync_$FUNCNAME_$SCRIPT_PID 2>&1 &"
|
||||||
eval $cmd
|
eval $cmd
|
||||||
WaitForTaskCompletion $! 0 1800
|
WaitForTaskCompletion $! 0 1800
|
||||||
if [ $? != 0 ]; then
|
if [ $? != 0 ]; then
|
||||||
Logger "Cannot get free space on target [$replica_path]." "ERROR"
|
Logger "Cannot get free space on target [$replica_path]." "ERROR"
|
||||||
Logger "Command output:\n$(cat $RUN_DIR/osync_$FUNCNAME_$SCRIPT_PID)"
|
Logger "Command output:\n$(cat $RUN_DIR/osync_$FUNCNAME_$SCRIPT_PID)" "NOTICE"
|
||||||
else
|
else
|
||||||
local target_space=$(cat $RUN_DIR/osync_$FUNCNAME_$SCRIPT_PID | tail -1 | awk '{print $4}')
|
local target_space=$(cat $RUN_DIR/osync_$FUNCNAME_$SCRIPT_PID | tail -1 | awk '{print $4}')
|
||||||
if [ $target_space -lt $MINIMUM_SPACE ]; then
|
if [ $target_space -lt $MINIMUM_SPACE ]; then
|
||||||
|
|
Loading…
Reference in New Issue