From 016272151339a9b5cbe626b1e954313a9f765828 Mon Sep 17 00:00:00 2001 From: deajan Date: Tue, 9 Aug 2016 13:48:21 +0200 Subject: [PATCH] Added missing fi --- dev/debug_osync.sh | 16 ++++++++++++++-- dev/n_osync.sh | 3 +++ dev/ofunctions.sh | 2 +- osync.sh | 16 ++++++++++++++-- 4 files changed, 32 insertions(+), 5 deletions(-) diff --git a/dev/debug_osync.sh b/dev/debug_osync.sh index a24ba17..6352483 100755 --- a/dev/debug_osync.sh +++ b/dev/debug_osync.sh @@ -1,5 +1,8 @@ #!/usr/bin/env bash +#TODO: add update script for -pgo options +# Also eliminate ACL sync script if all preserve = no + # Remove Waitfor function in already sent to background functions to reduce code overhead PROGRAM="osync" # Rsync based two way sync engine with fault tolerance @@ -46,7 +49,7 @@ IS_STABLE=no #### MINIMAL-FUNCTION-SET BEGIN #### -## FUNC_BUILD=2016080806 +## FUNC_BUILD=2016080901 ## BEGIN Generic functions for osync & obackup written in 2013-2016 by Orsiris de Jong - http://www.netpower.fr - ozy@netpower.fr #TODO: set _LOGGER_PREFIX in other apps, specially for osync daemon mode @@ -1194,7 +1197,6 @@ function PreInit { ## Set rsync default arguments RSYNC_ARGS="-rltD" - RSYNC_ATTR_ARGS="-pgo" if [ "$_DRYRUN" -eq 1 ]; then RSYNC_DRY_ARG="-n" DRY_WARNING="/!\ DRY RUN" @@ -1202,6 +1204,16 @@ function PreInit { RSYNC_DRY_ARG="" fi + RSYNC_ATTR_ARGS="" + if [ "$PRESERVE_PERMISSIONS" != "no" ]; then + RSYNC_ATTR_ARGS=$RSYNC_ATTR_ARGS" -p" + fi + if [ "$PRESERVE_OWNER" != "no" ]; then + RSYNC_ATTR_ARGS=$RSYNC_ATTR_ARGS" -o" + fi + if [ "$PRESERVE_GROUP" != "no" ]; then + RSYNC_ATTR_ARGS=$RSYNC_ATTR_ARGS" -g" + if [ "$PRESERVE_ACL" == "yes" ]; then RSYNC_ATTR_ARGS=$RSYNC_ATTR_ARGS" -A" fi diff --git a/dev/n_osync.sh b/dev/n_osync.sh index f693964..e728cef 100755 --- a/dev/n_osync.sh +++ b/dev/n_osync.sh @@ -1,5 +1,8 @@ #!/usr/bin/env bash +#TODO: add update script for -pgo options +# Also eliminate ACL sync script if all preserve = no + # Remove Waitfor function in already sent to background functions to reduce code overhead PROGRAM="osync" # Rsync based two way sync engine with fault tolerance diff --git a/dev/ofunctions.sh b/dev/ofunctions.sh index 62f2dc9..d555e45 100644 --- a/dev/ofunctions.sh +++ b/dev/ofunctions.sh @@ -1164,7 +1164,7 @@ function PreInit { fi if [ "$PRESERVE_GROUP" != "no" ]; then RSYNC_ATTR_ARGS=$RSYNC_ATTR_ARGS" -g" - + fi if [ "$PRESERVE_ACL" == "yes" ]; then RSYNC_ATTR_ARGS=$RSYNC_ATTR_ARGS" -A" fi diff --git a/osync.sh b/osync.sh index 0e0d67b..475c813 100755 --- a/osync.sh +++ b/osync.sh @@ -1,5 +1,8 @@ #!/usr/bin/env bash +#TODO: add update script for -pgo options +# Also eliminate ACL sync script if all preserve = no + # Remove Waitfor function in already sent to background functions to reduce code overhead PROGRAM="osync" # Rsync based two way sync engine with fault tolerance @@ -13,7 +16,7 @@ IS_STABLE=no #### MINIMAL-FUNCTION-SET BEGIN #### -## FUNC_BUILD=2016080806 +## FUNC_BUILD=2016080901 ## BEGIN Generic functions for osync & obackup written in 2013-2016 by Orsiris de Jong - http://www.netpower.fr - ozy@netpower.fr #TODO: set _LOGGER_PREFIX in other apps, specially for osync daemon mode @@ -1090,7 +1093,6 @@ function PreInit { ## Set rsync default arguments RSYNC_ARGS="-rltD" - RSYNC_ATTR_ARGS="-pgo" if [ "$_DRYRUN" -eq 1 ]; then RSYNC_DRY_ARG="-n" DRY_WARNING="/!\ DRY RUN" @@ -1098,6 +1100,16 @@ function PreInit { RSYNC_DRY_ARG="" fi + RSYNC_ATTR_ARGS="" + if [ "$PRESERVE_PERMISSIONS" != "no" ]; then + RSYNC_ATTR_ARGS=$RSYNC_ATTR_ARGS" -p" + fi + if [ "$PRESERVE_OWNER" != "no" ]; then + RSYNC_ATTR_ARGS=$RSYNC_ATTR_ARGS" -o" + fi + if [ "$PRESERVE_GROUP" != "no" ]; then + RSYNC_ATTR_ARGS=$RSYNC_ATTR_ARGS" -g" + if [ "$PRESERVE_ACL" == "yes" ]; then RSYNC_ATTR_ARGS=$RSYNC_ATTR_ARGS" -A" fi