mirror of
https://github.com/eworm-de/routeros-scripts
synced 2024-05-14 08:04:19 +00:00
firmware-upgrade-reboot: add a delay before reboot
Looks like my timing was too good... Upgrade and reboot happened too fast, so device reported: system;error;critical router was rebooted without proper shutdown Let's try something smart... Delay the reboot by the amount of uptime, and hope all devices - slow and powerful - are happy.
This commit is contained in:
parent
674398b342
commit
3f8e835233
1 changed files with 5 additions and 0 deletions
|
@ -28,5 +28,10 @@
|
|||
:delay 1s;
|
||||
}
|
||||
|
||||
:local Uptime [ / system resource get uptime ];
|
||||
:if ($Uptime < 1m) do={
|
||||
:delay $Uptime;
|
||||
}
|
||||
|
||||
$LogPrintExit2 info $0 ("Firmware upgrade successful, rebooting.") false;
|
||||
/ system reboot;
|
||||
|
|
Loading…
Reference in a new issue