mirror of
https://git.eworm.de/cgit/routeros-scripts
synced 2025-07-22 11:54:44 +02:00
check-lte-firmware-upgrade: RouterOS v7 path syntax
This commit is contained in:
parent
af8a24b959
commit
602933baec
1 changed files with 7 additions and 7 deletions
|
@ -28,12 +28,12 @@
|
||||||
:global SendNotification2;
|
:global SendNotification2;
|
||||||
:global SymbolForNotification;
|
:global SymbolForNotification;
|
||||||
|
|
||||||
:local IntName [ / interface lte get $Interface name ];
|
:local IntName [ /interface/lte/get $Interface name ];
|
||||||
:local Firmware;
|
:local Firmware;
|
||||||
:local Info;
|
:local Info;
|
||||||
:do {
|
:do {
|
||||||
:set Firmware [ / interface lte firmware-upgrade $Interface once as-value ];
|
:set Firmware [ /interface/lte/firmware-upgrade $Interface once as-value ];
|
||||||
:set Info [ / interface lte monitor $Interface once as-value ];
|
:set Info [ /interface/lte/monitor $Interface once as-value ];
|
||||||
} on-error={
|
} on-error={
|
||||||
$LogPrintExit2 debug $0 ("Could not get latest LTE firmware version for interface " . \
|
$LogPrintExit2 debug $0 ("Could not get latest LTE firmware version for interface " . \
|
||||||
$IntName . ".") false;
|
$IntName . ".") false;
|
||||||
|
@ -48,10 +48,10 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
:if ([ $ScriptFromTerminal "check-lte-firmware-upgrade" ] = true && \
|
:if ([ $ScriptFromTerminal "check-lte-firmware-upgrade" ] = 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={
|
||||||
/ system script run unattended-lte-firmware-upgrade;
|
/system/script/run unattended-lte-firmware-upgrade;
|
||||||
$LogPrintExit2 info $0 ("Scheduled lte firmware upgrade for interface " . $IntName . "...") false;
|
$LogPrintExit2 info $0 ("Scheduled lte firmware upgrade for interface " . $IntName . "...") false;
|
||||||
:return true;
|
:return true;
|
||||||
} else={
|
} else={
|
||||||
|
@ -77,6 +77,6 @@
|
||||||
:set ($SentLteFirmwareUpgradeNotification->$IntName) ($Firmware->"latest");
|
:set ($SentLteFirmwareUpgradeNotification->$IntName) ($Firmware->"latest");
|
||||||
}
|
}
|
||||||
|
|
||||||
:foreach Interface in=[ / interface lte find ] do={
|
:foreach Interface in=[ /interface/lte/find ] do={
|
||||||
$CheckInterface $Interface;
|
$CheckInterface $Interface;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue