"startup" script runs too early

Hey,

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..

No it is not a bug. Either use delay of for loop which waits for interfaces to appear.

I consider this to be a bug. When you handover the running system to a user it has to be in final state and not still in booting in progress state.

When user logs in, everything is in running state not in booting state :slight_smile:

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.

+1
maybe a depends-on field where effective starting time is related to the availability of software or hardware enabled entities that can be selected

Here is the first two lines of my startup script:

:log info “Starting System Startup script”
:delay 00:00:20

Note that all this script does is send me an E-Mail that lets me know that the router has booted.

Leave it to the HAM’s to understand. :slight_smile:
That’s almost exactly what I use. It works, and you can delay as long as you need.

BTW - K6DJJ here, Rancho Cucamonga, CA :slight_smile:

Yep. easy script and it works great.

And congrats on your new callsign issued today!

Jim - Do you work for DWP or SCE?

Used to be SCE, now elsewhere. PM me a direct contact so we can chat.

Sent from my phone using Tapatalk, so blame any typos on Android!

PMs are blocked here. You have Facebook or twitter?

K6ccc@amsat.org

Sent from my phone using Tapatalk, so blame any typos on Android!