mirror of
https://github.com/deajan/obackup.git
synced 2026-02-05 22:55:14 +01:00
Code cleanup
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
## FUNC_BUILD=2016071901
|
## FUNC_BUILD=2016071902
|
||||||
## BEGIN Generic functions for osync & obackup written in 2013-2016 by Orsiris de Jong - http://www.netpower.fr - ozy@netpower.fr
|
## BEGIN Generic functions for osync & obackup written in 2013-2016 by Orsiris de Jong - http://www.netpower.fr - ozy@netpower.fr
|
||||||
|
|
||||||
## type -p does not work on platforms other than linux (bash). If if does not work, always assume output is not a zero exitcode
|
## type -p does not work on platforms other than linux (bash). If if does not work, always assume output is not a zero exitcode
|
||||||
@@ -734,6 +734,8 @@ function WaitForTaskCompletion {
|
|||||||
local seconds_begin=$SECONDS # Seconds since the beginning of the script
|
local seconds_begin=$SECONDS # Seconds since the beginning of the script
|
||||||
local exec_time=0 # Seconds since the beginning of this function
|
local exec_time=0 # Seconds since the beginning of this function
|
||||||
|
|
||||||
|
local retval=0 # return value of monitored pid process
|
||||||
|
|
||||||
while eval "$PROCESS_TEST_CMD" > /dev/null
|
while eval "$PROCESS_TEST_CMD" > /dev/null
|
||||||
do
|
do
|
||||||
Spinner
|
Spinner
|
||||||
@@ -765,7 +767,7 @@ function WaitForTaskCompletion {
|
|||||||
sleep $SLEEP_TIME
|
sleep $SLEEP_TIME
|
||||||
done
|
done
|
||||||
wait $pid
|
wait $pid
|
||||||
local retval=$?
|
retval=$?
|
||||||
Logger "${FUNCNAME[0]} ended for [$caller_name] with status $retval." "PARANOIA_DEBUG" #__WITH_PARANOIA_DEBUG
|
Logger "${FUNCNAME[0]} ended for [$caller_name] with status $retval." "PARANOIA_DEBUG" #__WITH_PARANOIA_DEBUG
|
||||||
return $retval
|
return $retval
|
||||||
}
|
}
|
||||||
@@ -784,6 +786,8 @@ function WaitForCompletion {
|
|||||||
local seconds_begin=$SECONDS # Seconds since the beginning of the script
|
local seconds_begin=$SECONDS # Seconds since the beginning of the script
|
||||||
local exec_time=0 # Seconds since the beginning of this function
|
local exec_time=0 # Seconds since the beginning of this function
|
||||||
|
|
||||||
|
local retval=0 # return value of monitored pid process
|
||||||
|
|
||||||
while eval "$PROCESS_TEST_CMD" > /dev/null
|
while eval "$PROCESS_TEST_CMD" > /dev/null
|
||||||
do
|
do
|
||||||
Spinner
|
Spinner
|
||||||
|
|||||||
Reference in New Issue
Block a user