Am 17.07.2017 um 16:01 schrieb Guus Sliepen:
> On Mon, Jul 17, 2017 at 01:53:06PM +0200, Wouter Verhelst wrote:
> 
>>> A long time ago I created a PoC for ifupdown-wait-online [1]. It was
>>> rather simple though. I simply blocked until at least one interface was
>>> configured. One would probably want something more sophisticated.
>>

> Waiting until at least one interface is configured is quite naive: it
> will probably work very well when you only have one interface, but what
> if you have multiple interfaces? In that case, I'd rather have it block
> until all interfaces are up. This will still cover the single interface
> situation.

Indeed, the script is very naive. As said, it was meant as a PoC to show
how to hook into network-online.target.
Ideally this would be built directly into ifupdown instead of via hook
scripts. Maybe have a small ifup-wait-online binary which monitors the
state file via inotify or have ifup talk directly to this binary (e.g.
vai a socket). That binary could have different options:
- wait for all interfaces to be up
- wait for a single interface to be up
- wait for a given interface to be up
- wait for all auto interfaces, if there is no auto interface, wait for
at least one allow-hotplug interface
- some other criteria

Waiting for all interfaces to be up could have unpleasant side-effects.
E.g. I had a system with a auto eth0 and a allow-hotplug wlan config.
I did not always have the allow-hotplug device plugged in. So
ifup-wait-online would run into a time out every time.


-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to