mirror of
https://git.eworm.de/cgit/routeros-scripts
synced 2025-07-10 10:04:28 +02:00
backup-partition: give warning on lock in device-mode
RouterOS 7.17beta2 introduced some extra security measures, including some to prevent downgrade attacks for the installation. Thus switching partitions (which can hold quite old installations) is denied by device-mode now by default. Warn about that... https://help.mikrotik.com/docs/display/ROS/Device-mode
This commit is contained in:
parent
c2c72818de
commit
1776b8f50b
1 changed files with 7 additions and 0 deletions
|
@ -19,6 +19,7 @@
|
||||||
:global PackagesUpdateBackupFailure;
|
:global PackagesUpdateBackupFailure;
|
||||||
|
|
||||||
:global LogPrint;
|
:global LogPrint;
|
||||||
|
:global RequiredRouterOS;
|
||||||
:global ScriptFromTerminal;
|
:global ScriptFromTerminal;
|
||||||
:global ScriptLock;
|
:global ScriptLock;
|
||||||
:global VersionToNum;
|
:global VersionToNum;
|
||||||
|
@ -59,6 +60,12 @@
|
||||||
:error false;
|
:error false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
:if ([ $RequiredRouterOS $ScriptName "7.17beta2" false ] = true && \
|
||||||
|
([ /system/device-mode/get ]->"partitions") != true) do={
|
||||||
|
$LogPrint warning $ScriptName \
|
||||||
|
("The device mode has locked switching partitions! You will need physical access!");
|
||||||
|
}
|
||||||
|
|
||||||
:local FallbackToName [ /partitions/get $ActiveRunning fallback-to ];
|
:local FallbackToName [ /partitions/get $ActiveRunning fallback-to ];
|
||||||
:local FallbackTo [ /partition/find where name=$FallbackToName !active ];
|
:local FallbackTo [ /partition/find where name=$FallbackToName !active ];
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue