backup-partition: get the actual real name...

... to prevent confusion after restore.
This commit is contained in:
Christian Hesse 2024-02-02 10:53:31 +01:00
parent 0694d9af3e
commit 7b30af90b7

View file

@ -31,11 +31,11 @@ $ScriptLock $0;
:local FallbackTo [ /partitions/get $ActiveRunning fallback-to ]; :local FallbackTo [ /partitions/get $ActiveRunning fallback-to ];
:do { :do {
/system/scheduler/add start-time=startup \ /system/scheduler/add start-time=startup name="running-from-backup-partition" \
name=("running-from-" . $FallbackTo) \ on-event=(":log warning (\"Running from partition '\" . " . \
on-event=(":log warning \"Running from partition '" . $FallbackTo . "'!"); "[ /partitions/get [ find where running ] name ] . \"'!\")");
/partitions/save-config-to $FallbackTo; /partitions/save-config-to $FallbackTo;
/system/scheduler/remove ("running-from-" . $FallbackTo); /system/scheduler/remove "running-from-backup-partition";
$LogPrintExit2 info $0 ("Saved configuration to partition '" . \ $LogPrintExit2 info $0 ("Saved configuration to partition '" . \
$FallbackTo . "'.") false; $FallbackTo . "'.") false;
} on-error={ } on-error={