- Sync function merge (master and slave functions are more more or less the same)
- Tree function merge (current and after tree functions are the same except for output filename and logging)
- Tree functions execute piped commands (grep, awk) on master when launched on remote slave which can cause more bandwith usage
- Exit trap function must also kill child processes
- Make osync run on MSYS for Windows compatibility ?
KNOWN ISSUES
------------
- If master and remote slave systems don't have rsync in the same path, execution may fail (RSYNC_PATH is always configured on master, even when executed on slave)
- When remote system is Msys, Windows' find.exe is used instead of MSYS find
RECENT CHANGES
--------------
- Added local and remote operating system detection
- Added forced usage of MSYS find on remote MSYS hosts
- Updated MSYS handling
- Merged MSYS (MinGW minimal system) bash compatibility under Windows from Obackup
@ -480,7 +524,7 @@ function CheckConnectivity3rdPartyHosts
IFS=$' \t\n'
for i in $REMOTE_3RD_PARTY_HOSTS
do
if["$OSTYPE"=="msys"]
if["$LOCAL_OS"=="msys"]
then
ping $i -n 2 > /dev/null 2>&1
else
@ -1389,6 +1433,8 @@ function SoftDelete
function Init
{
GetOperatingSystem
# Set error exit code if a piped command fails
set -o pipefail
set -o errtrace
@ -1415,14 +1461,19 @@ function Init
MAIL_ALERT_MSG="Warning: Execution of osync instance $OSYNC_ID (pid $SCRIPT_PID) as $LOCAL_USER@$LOCAL_HOST produced errors."
## If running Msys, find command of windows is used instead of msys one
if["$OSTYPE"=="msys"]
if["$LOCAL_OS"=="msys"]
then
FIND_CMD=$(dirname $BASH)/find
else
FIND_CMD=find
fi
## Not elegant... waiting for a good idea on how to detect remote system
REMOTE_FIND_CMD=$FIND_CMD
if["$REMOTE_OS"=="msys"]
then
REMOTE_FIND_CMD=$(dirname $BASH)/find
else
REMOTE_FIND_CMD=find
fi
## Rsync does not like spaces in directory names, considering it as two different directories. Handling this schema by escaping space
## It seems this only happens when trying to execute an rsync command through eval $rsync_cmd... on a remote host. This is freaking unholy to find a workaround...