diff --git a/CHANGELOG.md b/CHANGELOG.md index 4caa046..f371277 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,7 @@ UNDER WORK RECENT CHANGES -------------- +- Added treat dir symlink as dir parameter - 27 May 2014: Osync 0.99 RC3 - Additionnal delete fix for *BSD and MSYS (deleted file list not created right) - Fixed dry mode to use non dry after run treelists to create delete lists diff --git a/osync.sh b/osync.sh index 13a9af9..c2d425e 100755 --- a/osync.sh +++ b/osync.sh @@ -4,7 +4,7 @@ PROGRAM="Osync" # Rsync based two way sync engine with fault tolerance AUTHOR="(L) 2013-2014 by Orsiris \"Ozy\" de Jong" CONTACT="http://www.netpower.fr/osync - ozy@netpower.fr" PROGRAM_VERSION=0.99RC3+ -PROGRAM_BUILD=2705201404 +PROGRAM_BUILD=2705201405 ## 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 @@ -1733,6 +1733,10 @@ function Init then RSYNC_ARGS=$RSYNC_ARGS" -L" fi + if [ "$KEEP_DIRLINKS" == "yes" ] + then + RSYNC_ARGS=$RSYNC_ARGS" -K" + fi if [ "$PRESERVE_HARDLINKS" == "yes" ] then RSYNC_ARGS=$RSYNC_ARGS" -H" @@ -1907,10 +1911,11 @@ function SyncOnChanges cmd="bash $osync_cmd $opts --no-locks" fi eval $cmd - if [ $? != 0 ] + retval = $? + if [ $retval != 0 ] then LogError "osync child exited with error." - exit 1 + exit $retval fi Log "#### Monitoring now." diff --git a/sync.conf b/sync.conf index 2f7cd29..9e5580d 100755 --- a/sync.conf +++ b/sync.conf @@ -2,7 +2,7 @@ ###### Osync - Rsync based two way sync engine with fault tolerance ###### (L) 2013-2014 by Orsiris "Ozy" de Jong (www.netpower.fr) -###### Config file rev 2705201402 +###### Config file rev 2705201403 ## ---------- GENERAL OPTIONS @@ -69,7 +69,9 @@ PRESERVE_ACL=no ## Preserve Xattr. Make sure source and target FS can manage same Xattrs or you'll get loads of errors. PRESERVE_XATTR=no ## Transforms symlinks into referent files/dirs -COPY_SYMLINKS=no +COPY_SYMLINKS=yes +## Treat symlinked dirs as dirs. CAUTION: This also follows symlinks outside of the replica root. +KEEP_DIRLINKS=yes ## Preserve hard links. Make sure source and target FS can manage hard links or you will lose them. PRESERVE_HARDLINKS=no