From 27d6b80fad22739b6e63b014c6cb9dd2e2b92c78 Mon Sep 17 00:00:00 2001 From: deajan Date: Thu, 18 Oct 2018 22:33:46 +0200 Subject: [PATCH] Minor fixes --- dev/n_osync.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/dev/n_osync.sh b/dev/n_osync.sh index b98a521..1746688 100644 --- a/dev/n_osync.sh +++ b/dev/n_osync.sh @@ -7,7 +7,7 @@ PROGRAM="osync" # Rsync based two way sync engine with fault tolerance AUTHOR="(C) 2013-2018 by Orsiris de Jong" CONTACT="http://www.netpower.fr/osync - ozy@netpower.fr" PROGRAM_VERSION=1.3.0-beta1 -PROGRAM_BUILD=2018101701 +PROGRAM_BUILD=2018101801 IS_STABLE=no ##### Execution order #__WITH_PARANOIA_DEBUG @@ -864,16 +864,16 @@ function _getFileCtimeMtimeLocal { echo -n "" > "$RUN_DIR/$PROGRAM.${FUNCNAME[0]}.$replicaType.$SCRIPT_PID.$TSTAMP" while IFS='' read -r file; do - $STAT_CTIME_MTIME_CMD "$replicaPath$file" >> "$RUN_DIR/$PROGRAM.${FUNCNAME[0]}.$replicaType.$SCRIPT_PID.$TSTAMP" + $STAT_CTIME_MTIME_CMD "$replicaPath$file" >> "$RUN_DIR/$PROGRAM.${FUNCNAME[0]}.$replicaType.$SCRIPT_PID.$TSTAMP" 2> "$RUN_DIR/$PROGRAM.${FUNCNAME[0]}.$replicaType.error.$SCRIPT_PID.$TSTAMP" if [ $? -ne 0 ]; then Logger "Could not get file attributes for [$replicaPath$file]." "ERROR" echo "1" > "$RUN_DIR/$PROGRAM.${FUNCNAME[0]}.subshellError.$replicaType.$SCRIPT_PID.$TSTAMP" fi done < "$fileList" if [ -f "$RUN_DIR/$PROGRAM.${FUNCNAME[0]}.subshellError.$replicaType.$SCRIPT_PID.$TSTAMP" ]; then - Logger "Getting file attributes failed [$retval] on $replicaType. Stopping execution." "CRITICAL" $retval - if [ -s "$RUN_DIR/$PROGRAM.ctime_mtime.$replicaType.$SCRIPT_PID.$TSTAMP" ]; then #WIP: does this file exist - Logger "Command output:\n$(cat $RUN_DIR/$PROGRAM.${FUNCNAME[0]}.$replicaType.$SCRIPT_PID.$TSTAMP)" "WARN" + Logger "Getting file time attributes failed [$retval] on $replicaType. Stopping execution." "CRITICAL" $retval + if [ -s "$RUN_DIR/$PROGRAM.${FUNCNAME[0]}.$replicaType.error.$SCRIPT_PID.$TSTAMP" ]; then + Logger "Command output:\n$(cat "$RUN_DIR/$PROGRAM.${FUNCNAME[0]}.$replicaType.error.$SCRIPT_PID.$TSTAMP")" "WARN" fi return 1 else @@ -2426,8 +2426,8 @@ function LogConflicts { fi - _LOGGER_PREFIX="" ( + _LOGGER_PREFIX="" if [ -f "$RUN_DIR/$PROGRAM.conflictList.compare.$SCRIPT_PID.$TSTAMP" ]; then echo "" > "${INITIATOR[$__replicaDir]}${INITIATOR[$__stateDir]}/${INITIATOR[$__conflictListFile]}" while read -r line; do