mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2025-08-04 10:14:31 +02:00
backup-partition: use $VersionToNum to calculate bitmask
This commit is contained in:
parent
41b19b045a
commit
734a80ba82
1 changed files with 2 additions and 1 deletions
|
@ -81,8 +81,9 @@
|
|||
:local Update [ /system/package/update/get ];
|
||||
:local NumInstalled [ $VersionToNum ($Update->"installed-version") ];
|
||||
:local NumLatest [ $VersionToNum ($Update->"latest-version") ];
|
||||
:local BitMask [ $VersionToNum "255.255zero0" ];
|
||||
:if ($BackupPartitionCopyBeforeFeatureUpdate = true && $NumLatest > 0 && \
|
||||
($NumInstalled & 0xffff0000) != ($NumLatest & 0xffff0000)) do={
|
||||
($NumInstalled & $BitMask) != ($NumLatest & $BitMask)) do={
|
||||
:if ([ $CopyTo $ScriptName $FallbackTo $FallbackToName ] = false) do={
|
||||
:set PackagesUpdateBackupFailure true;
|
||||
:error false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue