From f781f35ea14e3e10d9bdcda93ba4e64a19ff744d Mon Sep 17 00:00:00 2001 From: deajan Date: Mon, 20 May 2019 22:50:41 +0200 Subject: [PATCH] Rebuilt targets --- dev/debug_osync.sh | 10 +++++++--- osync.sh | 10 +++++++--- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/dev/debug_osync.sh b/dev/debug_osync.sh index 0c1d2d4..d0efe80 100755 --- a/dev/debug_osync.sh +++ b/dev/debug_osync.sh @@ -7,7 +7,7 @@ PROGRAM="osync" # Rsync based two way sync engine with fault tolerance AUTHOR="(C) 2013-2019 by Orsiris de Jong" CONTACT="http://www.netpower.fr/osync - ozy@netpower.fr" PROGRAM_VERSION=1.3.0-beta2 -PROGRAM_BUILD=2019052013 +PROGRAM_BUILD=2019052014 IS_STABLE=false CONFIG_FILE_REVISION_REQUIRED=1.3.0 @@ -4758,11 +4758,15 @@ function Sync { if [ "$SYNC_TYPE" == "initiator2target" ]; then resumeInitiator="${SYNC_ACTION[5]}" resumeTarget="${SYNC_ACTION[6]}" - rsyncRemoteDelete=true + if [ $(ArrayContains "${TARGET[$__type]}" "${SKIP_DELETION[@]}") -ne 0 ]; then + rsyncRemoteDelete=true + fi elif [ "$SYNC_TYPE" == "target2initiator" ]; then resumeInitiator="${SYNC_ACTION[6]}" resumeTarget="${SYNC_ACTION[5]}" - rsyncRemoteDelete=true + if [ $(ArrayContains "${INITIATOR[$__type]}" "${SKIP_DELETION[@]}") -ne 0 ]; then + rsyncRemoteDelete=true + fi fi ################################################################################################################################################# Actual sync begins here diff --git a/osync.sh b/osync.sh index 171dc65..6fdb8cb 100755 --- a/osync.sh +++ b/osync.sh @@ -7,7 +7,7 @@ PROGRAM="osync" # Rsync based two way sync engine with fault tolerance AUTHOR="(C) 2013-2019 by Orsiris de Jong" CONTACT="http://www.netpower.fr/osync - ozy@netpower.fr" PROGRAM_VERSION=1.3.0-beta2 -PROGRAM_BUILD=2019052013 +PROGRAM_BUILD=2019052014 IS_STABLE=false CONFIG_FILE_REVISION_REQUIRED=1.3.0 @@ -4548,11 +4548,15 @@ function Sync { if [ "$SYNC_TYPE" == "initiator2target" ]; then resumeInitiator="${SYNC_ACTION[5]}" resumeTarget="${SYNC_ACTION[6]}" - rsyncRemoteDelete=true + if [ $(ArrayContains "${TARGET[$__type]}" "${SKIP_DELETION[@]}") -ne 0 ]; then + rsyncRemoteDelete=true + fi elif [ "$SYNC_TYPE" == "target2initiator" ]; then resumeInitiator="${SYNC_ACTION[6]}" resumeTarget="${SYNC_ACTION[5]}" - rsyncRemoteDelete=true + if [ $(ArrayContains "${INITIATOR[$__type]}" "${SKIP_DELETION[@]}") -ne 0 ]; then + rsyncRemoteDelete=true + fi fi ################################################################################################################################################# Actual sync begins here