Run script after all interfaces are up

Hi! I have a program that has to be executed after all interface gets up. I wrote shell script that excutes my program in /etc/rc.local but it didn't worked well. Is there any way to run my script after all interface gets up?

Edit: Before I give any advice, maybe describe a little bit more in detail what exactly you are trying to achieve? Does that script have to execute once or every time all interfaces go up?

1 Like

Nope. My script has to be excute just once after boot. Before that my openwrt fails to boot after I edited /etc/rc.local is there any way to fix it?

A description of what your script is doing is important.

Also, how go you define “up”?

Do you have any tunnels, VPNs, client links, meshes, cellular connectivity, or the like?

Any other features of your network that aren’t wired Ethernet connections?


If I remember correctly, the boot process waits until "rc.local" ends, is your program returning when called from "rc.local'?

You can place a script at "/etc/hotplug.d" and it will be executed every time an interface changes, but you will have to check out by yourself when is the proper time to launch your program.

KISS: In /etc/rc.local insert one line
/etc/ &

In /etc/ , in a loop check the interfaces.