I’m writing an update script that needs to check a parameter value on wlan interface. The problem is that, with a scheduler that runs on startup, the interface is not loaded yet. So, for performance reasons, instead of waiting x seconds, I decided to check if interface was loaded and wait until it loads. But when I do so, the script runs in 6.47.10 but not in 6.42 because the variable access seems different in the execute command.
Can someone solve the problem with that script or have any other way to wait until interface is fully loaded?
Yeah, I know it is time to upgrade. We are curently upgrading all our devices and that’s why I’m builind this script.
The thing is that some equipment is old and other is not. If I just wait 4 seconds, some of them won’t have loaded the interface yet and the script won’t execute. If I wait too long, the updates will take forever. That’s why I wanted performance.
Just waiting until something is up should be an easy task in a scripting language made for this type of equipment but it doesn’t seem as it is.
I made a loop that checked for interface to be loaded and it seems it should work fine with newer versions (I did test the parts but not the whole thing yet) but if I can’t use my script in older versions just because the execute command was not working the same way, that’s quite an issue for MikroTik developers since making a “minor” release that breaks the past should not be done.
Yet thank you for your answer, I don’t want to be disrespectful, just that I think this kind of “bug” is strange coming from something as great as MikroTik
WARNING: migrating from 6.42 to 6.47.10 destroy some wireless settings:
“antenna-gain”, “frequency-mode”, and “installation” change the behavior on how frequency and TX power are managed from radio!!!
before upgrading do some test for set the CPE to those values and apply the correct value after upgrade:
:if ( ([/int wire get wlan1 country] != "debug") ||
([/int wire get wlan1 frequency-mode] != "superchannel")
) do={/int wire set wlan1 country=debug frequency-mode=superchannel}
I already knew for "Instalaltion" (that's why I made the post the other day) but I did not know for "antenna-gain" and "frequency-mode". I'll check for that and do some testing before going to production.