Fixed nomaxtime not honored

This commit is contained in:
deajan 2015-09-06 17:23:19 +02:00
parent 1e13d259cb
commit 00cefd010e
2 changed files with 8 additions and 4 deletions

View File

@ -21,6 +21,7 @@ UNDER WORK
CHANGELOG CHANGELOG
--------- ---------
- Fixed no_maxtime not honored
- Improved some logging, also added highlighting to stdout errors - Improved some logging, also added highlighting to stdout errors
- Backported some fixes from Osync - Backported some fixes from Osync
- Small improvements on install script - Small improvements on install script

View File

@ -5,7 +5,7 @@
AUTHOR="(L) 2013-2015 by Orsiris \"Ozy\" de Jong" AUTHOR="(L) 2013-2015 by Orsiris \"Ozy\" de Jong"
CONTACT="http://www.netpower.fr/obackup - ozy@netpower.fr" CONTACT="http://www.netpower.fr/obackup - ozy@netpower.fr"
PROGRAM_VERSION=1.9pre 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 ## 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 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." LogError "Max soft execution time of the whole backup exceeded while backing up $BACKUP_TASK."
soft_alert_total=1 soft_alert_total=1
fi 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 then
LogError "Max hard execution time of the whole backup exceeded while backing up $BACKUP_TASK, stopping backup process." LogError "Max hard execution time of the whole backup exceeded while backing up $BACKUP_TASK, stopping backup process."
exit 1 exit 1
@ -1574,8 +1574,11 @@ then
if [ $no_maxtime -eq 1 ] if [ $no_maxtime -eq 1 ]
then then
SOFT_MAX_EXEC_TIME=0 SOFT_MAX_EXEC_TIME_DB_TASK=0
HARD_MAX_EXEC_TIME=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 fi
OLD_IFS=$IFS OLD_IFS=$IFS
RunBeforeHook RunBeforeHook