mirror of
https://github.com/nymurbd/MikroTik-scripts.git
synced 2025-08-19 00:59:25 +02:00
check-lte-firmware-upgrade: unbreak terminal detectiono
This broke with commit 50d7e1fa41b8f8a6a1379de5521798346fd1ae9f... 🫣
This commit is contained in:
parent
0760ea9121
commit
8c458592f5
1 changed files with 5 additions and 4 deletions
|
@ -21,7 +21,8 @@ $ScriptLock $0;
|
||||||
}
|
}
|
||||||
|
|
||||||
:local CheckInterface do={
|
:local CheckInterface do={
|
||||||
:local Interface $1;
|
:local ScriptName $1;
|
||||||
|
:local Interface $2;
|
||||||
|
|
||||||
:global Identity;
|
:global Identity;
|
||||||
:global SentLteFirmwareUpgradeNotification;
|
:global SentLteFirmwareUpgradeNotification;
|
||||||
|
@ -51,13 +52,13 @@ $ScriptLock $0;
|
||||||
}
|
}
|
||||||
|
|
||||||
:if (($Firmware->"installed") = ($Firmware->"latest")) do={
|
:if (($Firmware->"installed") = ($Firmware->"latest")) do={
|
||||||
:if ([ $ScriptFromTerminal $0 ] = true) do={
|
:if ([ $ScriptFromTerminal $ScriptName ] = true) do={
|
||||||
$LogPrintExit2 info $0 ("No firmware upgrade available for LTE interface " . $IntName . ".") false;
|
$LogPrintExit2 info $0 ("No firmware upgrade available for LTE interface " . $IntName . ".") false;
|
||||||
}
|
}
|
||||||
:return true;
|
:return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
:if ([ $ScriptFromTerminal $0 ] = true && \
|
:if ([ $ScriptFromTerminal $ScriptName ] = true && \
|
||||||
[ :len [ /system/script/find where name="unattended-lte-firmware-upgrade" ] ] > 0) do={
|
[ :len [ /system/script/find where name="unattended-lte-firmware-upgrade" ] ] > 0) do={
|
||||||
:put ("Do you want to start unattended lte firmware upgrade for interface " . $IntName . "? [y/N]");
|
:put ("Do you want to start unattended lte firmware upgrade for interface " . $IntName . "? [y/N]");
|
||||||
:if (([ /terminal/inkey timeout=60 ] % 32) = 25) do={
|
:if (([ /terminal/inkey timeout=60 ] % 32) = 25) do={
|
||||||
|
@ -89,5 +90,5 @@ $ScriptLock $0;
|
||||||
}
|
}
|
||||||
|
|
||||||
:foreach Interface in=[ /interface/lte/find ] do={
|
:foreach Interface in=[ /interface/lte/find ] do={
|
||||||
$CheckInterface $Interface;
|
$CheckInterface $0 $Interface;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue