From c5f6874ad8a202eb47110b8b6bace8e30e31d5ac Mon Sep 17 00:00:00 2001 From: deajan Date: Sun, 28 Aug 2016 17:58:03 +0200 Subject: [PATCH] Added some preflight checks --- dev/n_osync.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/dev/n_osync.sh b/dev/n_osync.sh index a982ac4..d50bc6c 100755 --- a/dev/n_osync.sh +++ b/dev/n_osync.sh @@ -1,13 +1,12 @@ #!/usr/bin/env bash #TODO(critical): handle conflict prevalance, especially in sync_attrs function -#TODO(critical): writelockfiles remote does not shut execution PROGRAM="osync" # Rsync based two way sync engine with fault tolerance AUTHOR="(C) 2013-2016 by Orsiris de Jong" CONTACT="http://www.netpower.fr/osync - ozy@netpower.fr" PROGRAM_VERSION=1.2-dev-parallel -PROGRAM_BUILD=2016082201 +PROGRAM_BUILD=2016082801 IS_STABLE=no # Function Name Is parallel #__WITH_PARANOIA_DEBUG @@ -159,6 +158,10 @@ function CheckCurrentConfig { done #TODO(low): Add runtime variable tests (RSYNC_ARGS etc) + if [ "$REMOTE_OPERATION" == "yes" ] && [ ! -f "$SSH_RSA_PRIVATE_KEY" ]; then + Logger "Cannot find rsa private key [$SSH_RSA_PRIVATE_KEY]. Cannot connect to remote system." "CRITICAL" + exit 1 + fi } ###### Osync specific functions (non shared)