The ‘timeout’ value is 30 seconds in the ubus cli and for objects from services other than network that is probably sufficient. From testing, waiting for objects representing wan / lan interfaces to ‘appear’ (registered) in ubus the cli timeout value is insufficient. The numerous procd init scripts attempting to address race conditions or absence of interfaces attests to the necessity of enhancing the method to include a timeout value (it is possible from the implementing C-function but not the cli).
Any successes / comments / support for this issue?
The ‘if’ events are indeed ‘notified’ (posted) to the hotplug listener and if procd did not exist (in its ‘constrained’ cli form) it would be the answer. But procd (and its cli) does exist and therefore, IMNSHO, should, within reason, expose its C bindings.
More ‘findings’.
The call to ubus wait_for appears to block all processes, an undesirable effect IMNSHO, which prevents netifd from issuing a notify (posting) event to ubus → procd of the ‘waited’ object (here, that is the lan interface) -
Wed Apr 8 09:17:13 2026 user.info kernel: [ 27.933721] kmodloader: done loading kernel modules from /etc/modules.d/*
Wed Apr 8 09:17:15 2026 user.notice dnsmasq: DNS rebinding protection is active, will discard upstream RFC1918 responses!
Wed Apr 8 09:17:15 2026 user.notice dnsmasq: Allowing 127.0.0.0/8 responses
Wed Apr 8 09:17:17 2026 authpriv.info dropbear[1660]: Not backgrounding
Wed Apr 8 09:17:21 2026 local0.debug https-dns-proxy: [1772] Entered start_service()
Wed Apr 8 09:17:21 2026 daemon.notice wpa_supplicant[1770]: Successfully initialized wpa_supplicant
→ Wed Apr 8 09:17:21 2026 local0.debug https-dns-proxy [1772]: Entering 'wait' for interface(s) not yet available.
→ Wed Apr 8 09:17:51 2026 daemon.notice procd: /etc/rc.d/S20https-dns-proxy: Command failed: Request timed out
→ Wed Apr 8 09:18:21 2026 daemon.notice procd: /etc/rc.d/S20https-dns-proxy: Command failed: Request timed out
→ Wed Apr 8 09:18:51 2026 daemon.notice procd: /etc/rc.d/S20https-dns-proxy: Command failed: Request timed out
Wed Apr 8 09:18:51 2026 local0.debug https-dns-proxy [1772]: Exiting 'wait' for interface(s).
Wed Apr 8 09:18:51 2026 local0.debug https-dns-proxy: [1772] Entered start_instance()
Wed Apr 8 09:18:51 2026 local0.debug https-dns-proxy: [1772] Launching cfg022d79 from start_instance()
Wed Apr 8 09:18:51 2026 daemon.notice procd: /etc/rc.d/S20https-dns-proxy: sh: dev: unknown operand
Wed Apr 8 09:18:52 2026 daemon.notice procd: /etc/rc.d/S20https-dns-proxy: sh: dev: unknown operand
Wed Apr 8 09:18:52 2026 local0.debug https-dns-proxy: [1772] Entered start_instance()
Is this then the expected (intended) behaviour?