aboutsummaryrefslogtreecommitdiffstats
path: root/unattended-lte-firmware-upgrade
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2022-05-12 11:04:43 +0200
committerGravatar Christian Hesse <mail@eworm.de>2022-05-12 11:04:43 +0200
commitdf547b87a47e279d3f6b744675821621eea5d7b8 (patch)
treed5b33fb62e10637d70d8d0616437294ceb15ed9f /unattended-lte-firmware-upgrade
parent93ec9afe558ef6eba5d513fab359bb5f6618666d (diff)
parent12655bd58afc3a75fe3e2958bbe130b96f8b9be7 (diff)
Merge branch 'ros-v7-path-syntax' into next
Diffstat (limited to 'unattended-lte-firmware-upgrade')
-rw-r--r--unattended-lte-firmware-upgrade14
1 files changed, 7 insertions, 7 deletions
diff --git a/unattended-lte-firmware-upgrade b/unattended-lte-firmware-upgrade
index 14b03e5..d38b917 100644
--- a/unattended-lte-firmware-upgrade
+++ b/unattended-lte-firmware-upgrade
@@ -6,11 +6,11 @@
# schedule unattended lte firmware upgrade
# https://git.eworm.de/cgit/routeros-scripts/about/doc/unattended-lte-firmware-upgrade.md
-:foreach Interface in=[ / interface lte find where running ] do={
+:foreach Interface in=[ /interface/lte/find where running ] do={
:local Firmware;
- :local IntName [ / interface lte get $Interface name ];
+ :local IntName [ /interface/lte/get $Interface name ];
:do {
- :set Firmware [ / interface lte firmware-upgrade $Interface once as-value ];
+ :set Firmware [ /interface/lte/firmware-upgrade $Interface once as-value ];
} on-error={
:log debug ("Could not get latest LTE firmware version for interface " . $IntName . ".");
}
@@ -21,14 +21,14 @@
:global LTEFirmwareUpgrade do={
:global LTEFirmwareUpgrade;
:set LTEFirmwareUpgrade;
- / system scheduler remove ($1 . "-firmware-upgrade");
- / interface lte firmware-upgrade $1 upgrade=yes;
+ /system/scheduler/remove ($1 . "-firmware-upgrade");
+ /interface/lte/firmware-upgrade $1 upgrade=yes;
:log info ("LTE firmware upgrade finished, waiting for installation before reset.");
:delay 150s;
- / interface lte at-chat $1 input="AT+RESET";
+ /interface/lte/at-chat $1 input="AT+RESET";
:log info ("Reset device, waiting to finish and reconnect.");
}
- / system scheduler add name=($IntName . "-firmware-upgrade") start-time=startup interval=2s \
+ /system/scheduler/add name=($IntName . "-firmware-upgrade") start-time=startup interval=2s \
on-event=(":global LTEFirmwareUpgrade; \$LTEFirmwareUpgrade \"" . $IntName . "\";");
} else={
:log info ("The LTE firmware is up to date on interface " . $IntName . ".");