Moved trap functions later in init phase

This commit is contained in:
deajan 2016-11-30 14:21:53 +01:00
parent ff791f2ccf
commit 625a65bee0
1 changed files with 3 additions and 6 deletions

View File

@ -1457,11 +1457,6 @@ function RotateBackups {
fi fi
} }
function SetTraps {
trap TrapStop INT QUIT TERM HUP
trap TrapQuit EXIT
}
function Init { function Init {
__CheckArguments 0 $# ${FUNCNAME[0]} "$@" #__WITH_PARANOIA_DEBUG __CheckArguments 0 $# ${FUNCNAME[0]} "$@" #__WITH_PARANOIA_DEBUG
@ -1469,6 +1464,9 @@ function Init {
local hosturiandpath local hosturiandpath
local hosturi local hosturi
trap TrapStop INT QUIT TERM HUP
trap TrapQuit EXIT
## Test if target dir is a ssh uri, and if yes, break it down it its values ## Test if target dir is a ssh uri, and if yes, break it down it its values
if [ "${REMOTE_SYSTEM_URI:0:6}" == "ssh://" ] && [ "$BACKUP_TYPE" != "local" ]; then if [ "${REMOTE_SYSTEM_URI:0:6}" == "ssh://" ] && [ "$BACKUP_TYPE" != "local" ]; then
REMOTE_OPERATION="yes" REMOTE_OPERATION="yes"
@ -1671,7 +1669,6 @@ function GetCommandlineArguments {
done done
} }
SetTraps
GetCommandlineArguments "$@" GetCommandlineArguments "$@"
if [ "$_DECRYPT_MODE" == true ]; then if [ "$_DECRYPT_MODE" == true ]; then
CheckCryptEnvironnment CheckCryptEnvironnment