From 9d057ea95f0f33fdd2b4c3bb20e4127708e8839c Mon Sep 17 00:00:00 2001 From: deajan Date: Wed, 6 Apr 2016 20:41:58 +0200 Subject: [PATCH] Made logging begin before remote checks --- dev/debug_obackup.sh | 12 +++++++----- dev/n_obackup.sh | 12 +++++++----- obackup.sh | 12 +++++++----- 3 files changed, 21 insertions(+), 15 deletions(-) diff --git a/dev/debug_obackup.sh b/dev/debug_obackup.sh index bb76f68..5f5d5e5 100755 --- a/dev/debug_obackup.sh +++ b/dev/debug_obackup.sh @@ -5,7 +5,7 @@ PROGRAM="obackup" AUTHOR="(C) 2013-2016 by Orsiris de Jong" CONTACT="http://www.netpower.fr/obackup - ozy@netpower.fr" PROGRAM_VERSION=2.0-pre -PROGRAM_BUILD=2016040601 +PROGRAM_BUILD=2016040602 IS_STABLE=no ## FUNC_BUILD=2016040602 @@ -2408,16 +2408,18 @@ PreInit Init PostInit CheckCurrentConfig -if [ "$REMOTE_OPERATION" == "yes" ]; then - GetRemoteOS - InitRemoteOSSettings -fi + DATE=$(date) Logger "--------------------------------------------------------------------" "NOTICE" Logger "$DRY_WARNING $DATE - $PROGRAM v$PROGRAM_VERSION $BACKUP_TYPE script begin." "NOTICE" Logger "--------------------------------------------------------------------" "NOTICE" Logger "Backup instance [$INSTANCE_ID] launched as $LOCAL_USER@$LOCAL_HOST (PID $SCRIPT_PID)" "NOTICE" +if [ "$REMOTE_OPERATION" == "yes" ]; then + GetRemoteOS + InitRemoteOSSettings +fi + if [ $no_maxtime -eq 1 ]; then SOFT_MAX_EXEC_TIME_DB_TASK=0 SOFT_MAX_EXEC_TIME_FILE_TASK=0 diff --git a/dev/n_obackup.sh b/dev/n_obackup.sh index e9df2ab..19482dc 100755 --- a/dev/n_obackup.sh +++ b/dev/n_obackup.sh @@ -5,7 +5,7 @@ PROGRAM="obackup" AUTHOR="(C) 2013-2016 by Orsiris de Jong" CONTACT="http://www.netpower.fr/obackup - ozy@netpower.fr" PROGRAM_VERSION=2.0-pre -PROGRAM_BUILD=2016040601 +PROGRAM_BUILD=2016040602 IS_STABLE=no source "./ofunctions.sh" @@ -1359,16 +1359,18 @@ PreInit Init PostInit CheckCurrentConfig -if [ "$REMOTE_OPERATION" == "yes" ]; then - GetRemoteOS - InitRemoteOSSettings -fi + DATE=$(date) Logger "--------------------------------------------------------------------" "NOTICE" Logger "$DRY_WARNING $DATE - $PROGRAM v$PROGRAM_VERSION $BACKUP_TYPE script begin." "NOTICE" Logger "--------------------------------------------------------------------" "NOTICE" Logger "Backup instance [$INSTANCE_ID] launched as $LOCAL_USER@$LOCAL_HOST (PID $SCRIPT_PID)" "NOTICE" +if [ "$REMOTE_OPERATION" == "yes" ]; then + GetRemoteOS + InitRemoteOSSettings +fi + if [ $no_maxtime -eq 1 ]; then SOFT_MAX_EXEC_TIME_DB_TASK=0 SOFT_MAX_EXEC_TIME_FILE_TASK=0 diff --git a/obackup.sh b/obackup.sh index fdb8a67..7eeda18 100755 --- a/obackup.sh +++ b/obackup.sh @@ -5,7 +5,7 @@ PROGRAM="obackup" AUTHOR="(C) 2013-2016 by Orsiris de Jong" CONTACT="http://www.netpower.fr/obackup - ozy@netpower.fr" PROGRAM_VERSION=2.0-pre -PROGRAM_BUILD=2016040601 +PROGRAM_BUILD=2016040602 IS_STABLE=no ## FUNC_BUILD=2016040602 @@ -2298,16 +2298,18 @@ PreInit Init PostInit CheckCurrentConfig -if [ "$REMOTE_OPERATION" == "yes" ]; then - GetRemoteOS - InitRemoteOSSettings -fi + DATE=$(date) Logger "--------------------------------------------------------------------" "NOTICE" Logger "$DRY_WARNING $DATE - $PROGRAM v$PROGRAM_VERSION $BACKUP_TYPE script begin." "NOTICE" Logger "--------------------------------------------------------------------" "NOTICE" Logger "Backup instance [$INSTANCE_ID] launched as $LOCAL_USER@$LOCAL_HOST (PID $SCRIPT_PID)" "NOTICE" +if [ "$REMOTE_OPERATION" == "yes" ]; then + GetRemoteOS + InitRemoteOSSettings +fi + if [ $no_maxtime -eq 1 ]; then SOFT_MAX_EXEC_TIME_DB_TASK=0 SOFT_MAX_EXEC_TIME_FILE_TASK=0