|
|
@ -1,13 +1,12 @@
|
|
|
|
#!/usr/bin/env bash
|
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
|
|
|
|
#TODO(critical): handle conflict prevalance, especially in sync_attrs function
|
|
|
|
#TODO(critical): handle conflict prevalance, especially in sync_attrs function
|
|
|
|
#TODO(critical): test new WaitForTaskCompletion behavior with self=true
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
PROGRAM="osync" # Rsync based two way sync engine with fault tolerance
|
|
|
|
PROGRAM="osync" # Rsync based two way sync engine with fault tolerance
|
|
|
|
AUTHOR="(C) 2013-2016 by Orsiris de Jong"
|
|
|
|
AUTHOR="(C) 2013-2016 by Orsiris de Jong"
|
|
|
|
CONTACT="http://www.netpower.fr/osync - ozy@netpower.fr"
|
|
|
|
CONTACT="http://www.netpower.fr/osync - ozy@netpower.fr"
|
|
|
|
PROGRAM_VERSION=1.2-dev-parallel
|
|
|
|
PROGRAM_VERSION=1.2-dev-parallel
|
|
|
|
PROGRAM_BUILD=2016081902
|
|
|
|
PROGRAM_BUILD=2016082001
|
|
|
|
IS_STABLE=no
|
|
|
|
IS_STABLE=no
|
|
|
|
|
|
|
|
|
|
|
|
# Function Name Is parallel #__WITH_PARANOIA_DEBUG
|
|
|
|
# Function Name Is parallel #__WITH_PARANOIA_DEBUG
|
|
|
@ -223,15 +222,16 @@ function CheckReplicaPaths {
|
|
|
|
|
|
|
|
|
|
|
|
local pids
|
|
|
|
local pids
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Use direct comparaison before having a portable realpath implementation
|
|
|
|
#INITIATOR_SYNC_DIR_CANN=$(realpath "${INITIATOR[1]}") #TODO(verylow): investigate realpath & readlink issues on MSYS and busybox here
|
|
|
|
#INITIATOR_SYNC_DIR_CANN=$(realpath "${INITIATOR[1]}") #TODO(verylow): investigate realpath & readlink issues on MSYS and busybox here
|
|
|
|
#TARGET_SYNC_DIR_CANN=$(realpath "${TARGET[1]})
|
|
|
|
#TARGET_SYNC_DIR_CANN=$(realpath "${TARGET[1]})
|
|
|
|
|
|
|
|
|
|
|
|
#if [ "$REMOTE_OPERATION" != "yes" ]; then
|
|
|
|
if [ "$REMOTE_OPERATION" != "yes" ]; then
|
|
|
|
# if [ "$INITIATOR_SYNC_DIR_CANN" == "$TARGET_SYNC_DIR_CANN" ]; then
|
|
|
|
if [ "${INITIATOR[1]}" == "${TARGET[1]}" ]; then
|
|
|
|
# Logger "Master directory [${INITIATOR[1]}] cannot be the same as target directory." "CRITICAL"
|
|
|
|
Logger "Initiator and target path [${INITIATOR[1]}] cannot be the same." "CRITICAL"
|
|
|
|
# exit 1
|
|
|
|
exit 1
|
|
|
|
# fi
|
|
|
|
fi
|
|
|
|
#fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
_CheckReplicaPathsLocal "${INITIATOR[1]}" &
|
|
|
|
_CheckReplicaPathsLocal "${INITIATOR[1]}" &
|
|
|
|
pids="$!"
|
|
|
|
pids="$!"
|
|
|
|