tech-net archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Wait for interface existence?



>>>> I find myself wanting a tool that waits until a certain set of
>>>> network interfaces exists.  [...]
>>> ifwatchd?
>> Related, but I don't see any way to get what I want out of ifwatchd
>> without significant additional tooling around it.
[paragraph-length-line damage repaired manually]
> You would write an arrival and departure script for ifwatchd.  Each
> one would test for the existence of non existence of your
> requirements using ifconfig or any other tools and then take whatever
> action is required.

I notice you completely ignored my stated desire (in text I cut when
trimming, above) to shut it down once it has found the interfaces.  I
don't know whether this is because you didn't notice that text, because
you were hoping it would go away if you didn't address it, because you
think it's trivial, because you wanted to leave it as an exercise for
the reader, because you think the right answer is to have only one
(long-running) ifwatchd handling all the "wait for theses interfaces"
runs, or what.  Furthermore, ifwatchd's documentation is rather sorely
lacking in relevant respects (the only description of scripts'
arguments is not applicable to arrival and departure events, because it
includes a non-optional address parameter).

I can see two ways to do this with ifwatchd.

One is to extend it to provide a way for the scripts to shut ifwatchd
down, then write the relevant scripting.

The other is to run a single ifwatchd, handling all such runs in
parallel, with significantly more complicated scripting and some kind
of state storage.

Either of those would be a good deal more code than what I did to
ifconfig and would have correspondingly more failure modes.

It appears your stance is that that's the right answer.  If - if! -
that is NetBSD's stance as well, I will take that as a lack of interest
in adding the capability to ifconfig and will leave my own tree at
ifconfig -W.

/~\ The ASCII				  Mouse
\ / Ribbon Campaign
 X  Against HTML		mouse%rodents-montreal.org@localhost
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B


Home | Main Index | Thread Index | Old Index