diff options
author | Christian Hesse <mail@eworm.de> | 2024-12-06 10:19:54 +0100 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2024-12-09 11:49:50 +0100 |
commit | 36b81fab9474aa0ddc6acdb88f51ef211a1c5563 (patch) | |
tree | 2318add6c83da8d20453da46a55561781087c17a /backup-cloud.rsc | |
parent | ed6739b8bcb93f8e1025401e22db4244c70ac8c6 (diff) |
backup-cloud: use $ExitError to indicate unintentional error
Diffstat (limited to 'backup-cloud.rsc')
-rw-r--r-- | backup-cloud.rsc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/backup-cloud.rsc b/backup-cloud.rsc index f70752e..4cc7a58 100644 --- a/backup-cloud.rsc +++ b/backup-cloud.rsc @@ -12,6 +12,7 @@ :global GlobalFunctionsReady; :while ($GlobalFunctionsReady != true) do={ :delay 500ms; } +:local ExitOK false; :do { :local ScriptName [ :jobname ]; @@ -34,6 +35,7 @@ :if ([ $ScriptLock $ScriptName ] = false) do={ :set PackagesUpdateBackupFailure true; + :set ExitOK true; :error false; } $WaitFullyConnected; @@ -44,6 +46,7 @@ :if ([ $MkDir ("tmpfs/backup-cloud") ] = false) do={ $LogPrint error $ScriptName ("Failed creating directory!"); + :set ExitOK true; :error false; } @@ -87,4 +90,6 @@ :set PackagesUpdateBackupFailure true; } /file/remove "tmpfs/backup-cloud"; -} on-error={ } +} on-error={ + :global ExitError; $ExitError $ExitOK [ :jobname ]; +} |