diff options
author | Christian Hesse <mail@eworm.de> | 2024-03-08 09:26:39 +0100 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2024-03-12 15:27:15 +0100 |
commit | 51b00181cf6524f173f0464a237bdb63c3f0734a (patch) | |
tree | ceb853cb72b267a64445bbf4c9492786a270856a /backup-partition.rsc | |
parent | 5f41bd1c1ec98bea8d7cc1760ff740ded20aa4d1 (diff) |
backup-partition: pass failure to packages-update
Diffstat (limited to 'backup-partition.rsc')
-rw-r--r-- | backup-partition.rsc | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/backup-partition.rsc b/backup-partition.rsc index 1238fab..13ed8b9 100644 --- a/backup-partition.rsc +++ b/backup-partition.rsc @@ -15,21 +15,28 @@ :do { :local ScriptName [ :jobname ]; + :global PackagesUpdateBackupFailure; + :global LogPrintExit2; :global ScriptLock; :if ([ $ScriptLock $ScriptName ] = false) do={ + :set PackagesUpdateBackupFailure true; :error false; } :if ([ :len [ /partitions/find ] ] < 2) do={ - $LogPrintExit2 error $ScriptName ("Device does not have a fallback partition.") true; + $LogPrintExit2 error $ScriptName ("Device does not have a fallback partition.") false; + :set PackagesUpdateBackupFailure true; + :error false; } :local ActiveRunning [ /partitions/find where active running ]; :if ([ :len $ActiveRunning ] < 1) do={ - $LogPrintExit2 error $ScriptName ("Device is not running from active partition.") true; + $LogPrintExit2 error $ScriptName ("Device is not running from active partition.") false; + :set PackagesUpdateBackupFailure true; + :error false; } :local FallbackTo [ /partitions/get $ActiveRunning fallback-to ]; @@ -45,6 +52,8 @@ } on-error={ /system/scheduler/remove [ find where name="running-from-backup-partition" ]; $LogPrintExit2 error $ScriptName ("Failed saving configuration to partition '" . \ - $FallbackTo . "'!") true; + $FallbackTo . "'!") false; + :set PackagesUpdateBackupFailure true; + :error false; } } on-error={ } |