aboutsummaryrefslogtreecommitdiffstats
path: root/backup-partition.rsc
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2024-03-08 12:45:37 +0100
committerGravatar Christian Hesse <mail@eworm.de>2024-03-12 20:37:57 +0100
commitb879f8fef2fac123d3929f2964c9528465ce7a42 (patch)
treed929bc5bbcf2f0bf394f93ef64f9c06d9a0b96d8 /backup-partition.rsc
parent4b69144ee476ada47c640f1e5a65952bce7241ec (diff)
backup-partition: switch to $LogPrint
Diffstat (limited to 'backup-partition.rsc')
-rw-r--r--backup-partition.rsc12
1 files changed, 5 insertions, 7 deletions
diff --git a/backup-partition.rsc b/backup-partition.rsc
index 13ed8b9..503d382 100644
--- a/backup-partition.rsc
+++ b/backup-partition.rsc
@@ -17,7 +17,7 @@
:global PackagesUpdateBackupFailure;
- :global LogPrintExit2;
+ :global LogPrint;
:global ScriptLock;
:if ([ $ScriptLock $ScriptName ] = false) do={
@@ -26,7 +26,7 @@
}
:if ([ :len [ /partitions/find ] ] < 2) do={
- $LogPrintExit2 error $ScriptName ("Device does not have a fallback partition.") false;
+ $LogPrint error $ScriptName ("Device does not have a fallback partition.");
:set PackagesUpdateBackupFailure true;
:error false;
}
@@ -34,7 +34,7 @@
:local ActiveRunning [ /partitions/find where active running ];
:if ([ :len $ActiveRunning ] < 1) do={
- $LogPrintExit2 error $ScriptName ("Device is not running from active partition.") false;
+ $LogPrint error $ScriptName ("Device is not running from active partition.");
:set PackagesUpdateBackupFailure true;
:error false;
}
@@ -47,12 +47,10 @@
"[ /partitions/get [ find where running ] name ] . \"'!\")");
/partitions/save-config-to $FallbackTo;
/system/scheduler/remove "running-from-backup-partition";
- $LogPrintExit2 info $ScriptName ("Saved configuration to partition '" . \
- $FallbackTo . "'.") false;
+ $LogPrint info $ScriptName ("Saved configuration to partition '" . $FallbackTo . "'.");
} on-error={
/system/scheduler/remove [ find where name="running-from-backup-partition" ];
- $LogPrintExit2 error $ScriptName ("Failed saving configuration to partition '" . \
- $FallbackTo . "'!") false;
+ $LogPrint error $ScriptName ("Failed saving configuration to partition '" . $FallbackTo . "'!");
:set PackagesUpdateBackupFailure true;
:error false;
}