On 03/26/2015 06:54 PM, Jo-Philipp Wich wrote: > Hi. > >> Is there any way to synchronously (blocking) reload or restart the >> network configuration? >> >> "ubus call network reload" (or "restart") returns immediately, and the >> re-configuration happens asynchronously in the background. I'd like the >> command to block or otherwise wait until the reconfiguration is >> complete. Any way to achieve this? > > No. > > ~ Jow
Potential 'workarounds' 1) if you need to wait for your AP use e.g. 'ubus -t 30 wait_for hostapd.wlan0' to wait for it up to 30 secs to show up 2) to synchronize PROCD startup-scripts add a service_started() method in your scripts that does busy-polling for procd/netifd to bring up services. This blocks subsequent init-scripts from being executed before your current script is done. Some kind of dependency tracking within procd would help for sure (e.g. 'start this service only after services x+y are running'), but given how services are handled as independent instances now, this would add lots of complexity to modules that must not fail. _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel