aboutsummaryrefslogtreecommitdiffstats
path: root/backup-partition.rsc
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2024-02-02 10:43:15 +0100
committerGravatar Christian Hesse <mail@eworm.de>2024-02-02 12:53:45 +0100
commit0694d9af3ec5d7fdee7aad25ec132c4e3f9b2faf (patch)
tree8572b2e8c29a6de4d60f80b35290261057ba1bbd /backup-partition.rsc
parent77ef9b2c9593b88b11bc3f2616b8ac9d1f8f2d4c (diff)
backup-partition: add a scheduler in backup...
... that logs a warning when backup is booted.
Diffstat (limited to 'backup-partition.rsc')
-rw-r--r--backup-partition.rsc4
1 files changed, 4 insertions, 0 deletions
diff --git a/backup-partition.rsc b/backup-partition.rsc
index 075ca95..5d131c9 100644
--- a/backup-partition.rsc
+++ b/backup-partition.rsc
@@ -31,7 +31,11 @@ $ScriptLock $0;
:local FallbackTo [ /partitions/get $ActiveRunning fallback-to ];
:do {
+ /system/scheduler/add start-time=startup \
+ name=("running-from-" . $FallbackTo) \
+ on-event=(":log warning \"Running from partition '" . $FallbackTo . "'!");
/partitions/save-config-to $FallbackTo;
+ /system/scheduler/remove ("running-from-" . $FallbackTo);
$LogPrintExit2 info $0 ("Saved configuration to partition '" . \
$FallbackTo . "'.") false;
} on-error={