Still adding MSYS compat

pull/2/head
deajan 11 years ago
parent fb7544cf20
commit 017a6f1f12

@ -5,16 +5,26 @@ FUTURE IMPROVEMENTS
- Tree function merge (current and after tree functions are the same except for output filename and logging) - 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 - 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 - Exit trap function must also kill child processes
- Make osync run on Cygwin for Windows compatibility - Make osync run on MSYS for Windows compatibility ?
KNOWN ISSUES 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) - 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 RECENT CHANGES
-------------- --------------
- Merged MSYS (MinGW minimal system) bash compatibility under Windows from Obackup
- Added check for /var/log directory
- Added check for shared memory directory
- Added alternative way to kill child processes for other OSes and especially for MSYS (which is a very odd way)
- Added Sendemail.exe support for windows Alerting
- Replaced which commend by type -p, as it is more portable
- Added support for ping.exe from windows
- Forced usage of MSYS find instead of Windows' find.exe on master
- Added an optionnal remote rsync executable path parameter
- Fixed an issue with CheckConnectivity3rdPartyHosts - Fixed an issue with CheckConnectivity3rdPartyHosts
- Added an option to stop execution if a local / remote command fails - Added an option to stop execution if a local / remote command fails
- Improved forced quit command by killing all child processes - Improved forced quit command by killing all child processes

@ -1455,22 +1455,32 @@ function Init
RSYNC_SSH_CMD="$(type -p ssh) $SSH_COMP -i $SSH_RSA_PRIVATE_KEY -p $REMOTE_PORT" RSYNC_SSH_CMD="$(type -p ssh) $SSH_COMP -i $SSH_RSA_PRIVATE_KEY -p $REMOTE_PORT"
fi fi
## Set rsync executable and rsync path (for remote sudo rsync) ## Support for older config files without RSYNC_EXECUTABLE option
if [ "$RSYNC_EXECUTABLE" == "" ] if [ "$RSYNC_EXECUTABLE" == "" ]
then then
RSYNC_EXECUTABLE=rsync RSYNC_EXECUTABLE=rsync
fi fi
## Sudo execution option
if [ "$SUDO_EXEC" == "yes" ] if [ "$SUDO_EXEC" == "yes" ]
then then
RSYNC_PATH="sudo $(type -p $RSYNC_EXECUTABLE)" if [ "$RSYNC_REMOTE_PATH" != "" ]
then
RSYNC_PATH="sudo $(type -p $RSYNC_REMOTE_PATH)/$RSYNC_EXECUTABLE)"
else
RSYNC_PATH="sudo $RSYNC_EXECUTABLE"
fi
COMMAND_SUDO="sudo" COMMAND_SUDO="sudo"
else else
RSYNC_PATH="$(type -p $RSYNC_EXECUTABLE)" if [ "$RSYNC_REMOTE_PATH" != "" ]
then
RSYNC_PATH="$(type -p $RSYNC_REMOTE_PATH)/$RSYNC_EXECUTABLE)"
else
RSYNC_PATH="$RSYNC_EXECUTABLE"
fi
COMMAND_SUDO="" COMMAND_SUDO=""
fi fi
## Set rsync options ## Set rsync options
RSYNC_ARGS="-" RSYNC_ARGS="-"
if [ "$PRESERVE_ACL" == "yes" ] if [ "$PRESERVE_ACL" == "yes" ]

@ -2,12 +2,12 @@
###### Osync - Rsync based two way sync engine with fault tolerance ###### Osync - Rsync based two way sync engine with fault tolerance
###### (L) 2013 by Orsiris "Ozy" de Jong (www.netpower.fr) ###### (L) 2013 by Orsiris "Ozy" de Jong (www.netpower.fr)
#### Config file rev 1010201301 #### Config file rev 1010201302
## Sync job identification, any string you want, no spaces ## Sync job identification, any string you want, no spaces
SYNC_ID="sync_test" SYNC_ID="sync_test"
## Leaving this empty will create a logfile at /var/log/osync_version_SYNC_ID.log ## Leaving this empty will create a logfile at /var/log/osync_version_SYNC_ID.log (or current directory if /var/log doesn't exist)
LOGFILE="" LOGFILE=""
## Directories to synchronize ## Directories to synchronize
@ -47,6 +47,8 @@ REMOTE_HOST_PING=no
## If you use this function, you should set more than one 3rd party host, and be sure you can ping them. ## If you use this function, you should set more than one 3rd party host, and be sure you can ping them.
## Be aware some DNS like opendns redirect false hostnames. Also, this adds an extra execution time of a bit less than a minute. ## Be aware some DNS like opendns redirect false hostnames. Also, this adds an extra execution time of a bit less than a minute.
REMOTE_3RD_PARTY_HOSTS="www.kernel.org www.google.fr" REMOTE_3RD_PARTY_HOSTS="www.kernel.org www.google.fr"
## Remote rsync executable path. Leave this empty in most cases
REMOTE_RSYNC_PATH=""
## Preserve ACLS. Make sure target FS can hold ACLs or you'll get loads of errors. ## Preserve ACLS. Make sure target FS can hold ACLs or you'll get loads of errors.
PRESERVE_ACL=no PRESERVE_ACL=no

Loading…
Cancel
Save