From 00cefd010e94834cb7119cf7118fddf4ee9df213 Mon Sep 17 00:00:00 2001 From: deajan Date: Sun, 6 Sep 2015 17:23:19 +0200 Subject: [PATCH] Fixed nomaxtime not honored --- CHANGELOG.md | 1 + obackup.sh | 11 +++++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c80c5ec..9fcf478 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,7 @@ UNDER WORK CHANGELOG --------- +- Fixed no_maxtime not honored - Improved some logging, also added highlighting to stdout errors - Backported some fixes from Osync - Small improvements on install script diff --git a/obackup.sh b/obackup.sh index 08a46f1..4f5fcba 100755 --- a/obackup.sh +++ b/obackup.sh @@ -5,7 +5,7 @@ AUTHOR="(L) 2013-2015 by Orsiris \"Ozy\" de Jong" CONTACT="http://www.netpower.fr/obackup - ozy@netpower.fr" PROGRAM_VERSION=1.9pre -PROGRAM_BUILD=2015082601 +PROGRAM_BUILD=2015090601 ## type doesn't work on platforms other than linux (bash). If if doesn't work, always assume output is not a zero exitcode if ! type -p "$BASH" > /dev/null @@ -674,7 +674,7 @@ function CheckTotalExecutionTime LogError "Max soft execution time of the whole backup exceeded while backing up $BACKUP_TASK." soft_alert_total=1 fi - if [ $SECONDS -gt $HARD_MAX_EXEC_TIME_TOTAL ] + if [ $SECONDS -gt $HARD_MAX_EXEC_TIME_TOTAL ] && [ $HARD_MAX_EXEC_TIME_TOTAL -ne 0 ] then LogError "Max hard execution time of the whole backup exceeded while backing up $BACKUP_TASK, stopping backup process." exit 1 @@ -1574,8 +1574,11 @@ then if [ $no_maxtime -eq 1 ] then - SOFT_MAX_EXEC_TIME=0 - HARD_MAX_EXEC_TIME=0 + SOFT_MAX_EXEC_TIME_DB_TASK=0 + SOFT_MAX_EXEC_TIME_FILE_TASK=0 + HARD_MAX_EXEC_TIME_DB_TASK=0 + HARD_MAX_EXEC_TIME_FILE_TASK=0 + HARD_MAX_EXEC_TIME_TOTAL=0 fi OLD_IFS=$IFS RunBeforeHook