aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2024-07-05 15:19:11 +0200
committerGravatar Christian Hesse <mail@eworm.de>2024-07-05 15:19:11 +0200
commit1bc6f9c45c7487c6b1fa1c26a9ceeaeadd86c90c (patch)
treef9fc341c82ead931ab3344a704593965f70d5802
parent64bc9f73f7ed24cfb7dec9f24fb101594ae4cb79 (diff)
backup-partition: rename variable
-rw-r--r--backup-partition.rsc16
1 files changed, 8 insertions, 8 deletions
diff --git a/backup-partition.rsc b/backup-partition.rsc
index 3c883f7..572c740 100644
--- a/backup-partition.rsc
+++ b/backup-partition.rsc
@@ -58,13 +58,13 @@
:error false;
}
- :local FallbackTo [ /partitions/get $ActiveRunning fallback-to ];
+ :local FallbackToName [ /partitions/get $ActiveRunning fallback-to ];
- :if ([ /partitions/get $ActiveRunning version ] != [ /partitions/get $FallbackTo version]) do={
+ :if ([ /partitions/get $ActiveRunning version ] != [ /partitions/get $FallbackToName version]) do={
:if ([ $ScriptFromTerminal $ScriptName ] = true) do={
- :put ("The partitions have different RouterOS versions. Copy over to '" . $FallbackTo . "'? [y/N]");
+ :put ("The partitions have different RouterOS versions. Copy over to '" . $FallbackToName . "'? [y/N]");
:if (([ /terminal/inkey timeout=60 ] % 32) = 25) do={
- :if ([ $CopyTo $ScriptName $FallbackTo ] = false) do={
+ :if ([ $CopyTo $ScriptName $FallbackToName ] = false) do={
:set PackagesUpdateBackupFailure true;
:error false;
}
@@ -75,7 +75,7 @@
:local NumLatest [ $VersionToNum ($Update->"latest-version") ];
:if ($BackupPartitionCopyBeforeFeatureUpdate = true && $NumLatest > 0 && \
($NumInstalled & 0xffff0000) != ($NumLatest & 0xffff0000)) do={
- :if ([ $CopyTo $ScriptName $FallbackTo ] = false) do={
+ :if ([ $CopyTo $ScriptName $FallbackToName ] = false) do={
:set PackagesUpdateBackupFailure true;
:error false;
}
@@ -87,12 +87,12 @@
/system/scheduler/add start-time=startup name="running-from-backup-partition" \
on-event=(":log warning (\"Running from partition '\" . " . \
"[ /partitions/get [ find where running ] name ] . \"'!\")");
- /partitions/save-config-to $FallbackTo;
+ /partitions/save-config-to $FallbackToName;
/system/scheduler/remove "running-from-backup-partition";
- $LogPrint info $ScriptName ("Saved configuration to partition '" . $FallbackTo . "'.");
+ $LogPrint info $ScriptName ("Saved configuration to partition '" . $FallbackToName . "'.");
} on-error={
/system/scheduler/remove [ find where name="running-from-backup-partition" ];
- $LogPrint error $ScriptName ("Failed saving configuration to partition '" . $FallbackTo . "'!");
+ $LogPrint error $ScriptName ("Failed saving configuration to partition '" . $FallbackToName . "'!");
:set PackagesUpdateBackupFailure true;
:error false;
}