I have dumped 2 hours today to find out that a scheduler script with “startup” time runs before wlan and bridge interfaces are configured.
RouterBOARD 941-2nD 6.35.1
log in the script brings this:
:log info [/interface find];
*1;*2;*3;*4
Isn’t it a bug? Is there a good workaround for that? I find “delay 5s” ugly..
When user logs in, everything is in running state not in booting state
That is why startup script is called “startup”, because it is executed at startup. You have to be prepared that some ethernet or other interface drivers may not be loaded yet, especially in boards with slow CPUs.
You can call it a bug if it makes you happy and live with it.
No. It doesn’t make me happy. I have always 1minute delay on the startup scripts to be sure they are run after everything is finished. But it is just workaround.
In fairness, if you’re not touching interfaces, having your script run so late may be very bad for performance, so it’s kind of understandable that the startup script would start early.
@mrz
Here’s a feature request then:
Add a new event type in scheduler, say called “delayed-startup” f.e. (or something else, doesn’t matter, as long as it’s not “startup”) that would only trigger the script after all interfaces are ready, and if there’s something else that gets started with a delay, wait for it too, before finally running the script.