Bring up (activate) interface delayed

Hey guys, there is an interface in my openWRT, which I would like to bring up after 5 minutes of booting.
I thought of having a cronjob with a small shell script which is checking/doing every 5 minutes the following:
"is interface X running? If not, activate. If yes, dont do anything".
Would be very happy if you could support me with that!

Thank you!

opkg update ; opkg install jq
ifstatus <interface>| jq '.up'

Hey, thanks for replying. Why do You install a package called jq. Isn't it possible without this package?

easier to parse output of ifstatus. it is not necessary but useful.

edit /etc/rc.local:
sh /etc/ifup_delayed.sh &

edit /etc/ifup_delayed.sh:
#!/bin/sh
sleep 300
ifup yourinterface

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.