From 555d8e6d233fecd65f11a4df4eccbb0e9e36f45b Mon Sep 17 00:00:00 2001 From: deajan Date: Mon, 20 May 2019 18:20:01 +0200 Subject: [PATCH] Unexpanded current dev --- dev/n_osync.sh | 64 +++++++++++++++++++++++++------------------------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/dev/n_osync.sh b/dev/n_osync.sh index ff615a9..5f441f8 100644 --- a/dev/n_osync.sh +++ b/dev/n_osync.sh @@ -663,11 +663,11 @@ function HandleLocks { fi if [ $initiatorLockSuccess == true ]; then - INITIATOR_LOCK_FILE_EXISTS=true - fi - if [ $targetLockSuccess == true ]; then - TARGET_LOCK_FILE_EXISTS=true - fi + INITIATOR_LOCK_FILE_EXISTS=true + fi + if [ $targetLockSuccess == true ]; then + TARGET_LOCK_FILE_EXISTS=true + fi } function _UnlockReplicasLocal { @@ -2428,32 +2428,32 @@ function _SummaryFromRsyncFile { __CheckArguments 3 $# "$@" #__WITH_PARANOIA_DEBUG if [ -f "$summaryFile" ]; then - while read -r file; do - # grep -E "^<|^>|^\." = Remove all lines that do not begin with '<', '>' or '.' to deal with a bizarre bug involving rsync 3.0.6 / CentOS 6 and --skip-compress showing 'adding zip' l$ - if echo "$file" | grep -E "^<|^>|^\.|^\*" > /dev/null 2>&1; then - # Check for time attribute changes only (eg rsync output '.d..t......' - if echo "$file" | grep -E "\..\.\.t\.\.\.\.\.\." > /dev/null 2>&1; then - verb="TIMESTAMP" - elif echo "$file" | grep -E "\*deleting" > /dev/null 2>&1; then - verb="DELETE" - if [ "$direction" == ">>" ]; then - TARGET_DELETES_COUNT=$((TARGET_DELETES_COUNT+1)) - elif [ "$direction" == "<<" ]; then - INITIATOR_DELETES_COUNT=$((INITIATOR_DELETES_COUNT+1)) - fi - else - verb="UPDATE" - if [ "$direction" == ">>" ]; then - TARGET_UPDATES_COUNT=$((TARGET_UPDATES_COUNT+1)) - elif [ "$direction" == "<<" ]; then - INITIATOR_UPDATES_COUNT=$((INITIATOR_UPDATES_COUNT+1)) - fi - fi - # awk removes first part of line until space, then show all others - # We don't use awk '$1="";print $0' since it would keep a space as first character - Logger "$verb $direction $replicaPath$(echo "$file" | awk '{for (i=2; i|^\." = Remove all lines that do not begin with '<', '>' or '.' to deal with a bizarre bug involving rsync 3.0.6 / CentOS 6 and --skip-compress showing 'adding zip' l$ + if echo "$file" | grep -E "^<|^>|^\.|^\*" > /dev/null 2>&1; then + # Check for time attribute changes only (eg rsync output '.d..t......' + if echo "$file" | grep -E "\..\.\.t\.\.\.\.\.\." > /dev/null 2>&1; then + verb="TIMESTAMP" + elif echo "$file" | grep -E "\*deleting" > /dev/null 2>&1; then + verb="DELETE" + if [ "$direction" == ">>" ]; then + TARGET_DELETES_COUNT=$((TARGET_DELETES_COUNT+1)) + elif [ "$direction" == "<<" ]; then + INITIATOR_DELETES_COUNT=$((INITIATOR_DELETES_COUNT+1)) + fi + else + verb="UPDATE" + if [ "$direction" == ">>" ]; then + TARGET_UPDATES_COUNT=$((TARGET_UPDATES_COUNT+1)) + elif [ "$direction" == "<<" ]; then + INITIATOR_UPDATES_COUNT=$((INITIATOR_UPDATES_COUNT+1)) + fi + fi + # awk removes first part of line until space, then show all others + # We don't use awk '$1="";print $0' since it would keep a space as first character + Logger "$verb $direction $replicaPath$(echo "$file" | awk '{for (i=2; i