From e1d7213e91fb41f6dd41c7879b95f91b752f9615 Mon Sep 17 00:00:00 2001 From: deajan Date: Tue, 14 Mar 2017 22:36:27 +0100 Subject: [PATCH] Rebuilt targets --- dev/debug_osync.sh | 12 +++++++++--- install.sh | 14 ++++++++++---- osync.sh | 16 ++++++++++------ 3 files changed, 29 insertions(+), 13 deletions(-) diff --git a/dev/debug_osync.sh b/dev/debug_osync.sh index 065734a..ff2e632 100755 --- a/dev/debug_osync.sh +++ b/dev/debug_osync.sh @@ -40,8 +40,8 @@ IS_STABLE=no # CleanUp no #__WITH_PARANOIA_DEBUG -_OFUNCTIONS_VERSION=2.1-RC3 -_OFUNCTIONS_BUILD=2017021003 +_OFUNCTIONS_VERSION=2.1-RC3+dev +_OFUNCTIONS_BUILD=2017031301 _OFUNCTIONS_BOOTSTRAP=true ## BEGIN Generic bash functions written in 2013-2017 by Orsiris de Jong - http://www.netpower.fr - ozy@netpower.fr @@ -102,7 +102,7 @@ if [ "$SLEEP_TIME" == "" ]; then # Leave the possibity to set SLEEP_TIME as envi fi SCRIPT_PID=$$ -TSTAMP=$(date '+%Y%m%d%H%M%S%N') +TSTAMP=$(date '+%Y%m%dT%H%M%S.%N') LOCAL_USER=$(whoami) LOCAL_HOST=$(hostname) @@ -1314,6 +1314,12 @@ function RunRemoteCommand { local hardMaxTime="${2}" # Max time to wait for command to compleet __CheckArguments 2 $# "$@" #__WITH_PARANOIA_DEBUG + + if [ "$REMOTE_OPERATION" != "yes" ]; then + Logger "Ignoring remote command [$command] because remote host is not configured." "WARN" + return 0 + fi + CheckConnectivity3rdPartyHosts CheckConnectivityRemoteHost if [ $_DRYRUN == true ]; then diff --git a/install.sh b/install.sh index b07056c..5bb2f51 100755 --- a/install.sh +++ b/install.sh @@ -1,14 +1,18 @@ #!/usr/bin/env bash +## Installer script suitable for osync / obackup / pmocr + _OFUNCTIONS_BOOTSTRAP=true PROGRAM=osync -PROGRAM_VERSION=1.2-RC3 + +PROGRAM_VERSION=$(grep "PROGRAM_VERSION=" $PROGRAM.sh) +PROGRAM_VERSION=${PROGRAM_VERSION#*=} PROGRAM_BINARY=$PROGRAM".sh" PROGRAM_BATCH=$PROGRAM"-batch.sh" SSH_FILTER="ssh_filter.sh" -SCRIPT_BUILD=2017021002 +SCRIPT_BUILD=2017031402 ## osync / obackup / pmocr / zsnap install script ## Tested on RHEL / CentOS 6 & 7, Fedora 23, Debian 7 & 8, Mint 17 and FreeBSD 8, 10 and 11 @@ -304,8 +308,10 @@ function CopyExampleFiles { function CopyProgram { binFiles=() binFiles[0]="$PROGRAM_BINARY" - binFiles[1]="$PROGRAM_BATCH" - binFiles[2]="$SSH_FILTER" + if [ "$PROGRAM" == "osync" ] || [ "$PROGRAM" == "obackup" ]; then + binFiles[1]="$PROGRAM_BATCH" + binFiles[2]="$SSH_FILTER" + fi local user="" local group="" diff --git a/osync.sh b/osync.sh index c30642f..b8b93bc 100755 --- a/osync.sh +++ b/osync.sh @@ -5,12 +5,10 @@ AUTHOR="(C) 2013-2017 by Orsiris de Jong" CONTACT="http://www.netpower.fr/osync - ozy@netpower.fr" PROGRAM_VERSION=1.2-RC3 PROGRAM_BUILD=2017021001 -IS_STABLE=no +IS_STABLE=yes - - -_OFUNCTIONS_VERSION=2.1-RC3 -_OFUNCTIONS_BUILD=2017021003 +_OFUNCTIONS_VERSION=2.1-RC3+dev +_OFUNCTIONS_BUILD=2017031301 _OFUNCTIONS_BOOTSTRAP=true ## BEGIN Generic bash functions written in 2013-2017 by Orsiris de Jong - http://www.netpower.fr - ozy@netpower.fr @@ -67,7 +65,7 @@ if [ "$SLEEP_TIME" == "" ]; then # Leave the possibity to set SLEEP_TIME as envi fi SCRIPT_PID=$$ -TSTAMP=$(date '+%Y%m%d%H%M%S%N') +TSTAMP=$(date '+%Y%m%dT%H%M%S.%N') LOCAL_USER=$(whoami) LOCAL_HOST=$(hostname) @@ -1245,6 +1243,12 @@ function RunRemoteCommand { local command="${1}" # Command to run local hardMaxTime="${2}" # Max time to wait for command to compleet + + if [ "$REMOTE_OPERATION" != "yes" ]; then + Logger "Ignoring remote command [$command] because remote host is not configured." "WARN" + return 0 + fi + CheckConnectivity3rdPartyHosts CheckConnectivityRemoteHost if [ $_DRYRUN == true ]; then