On 9/20/16, Denys Vlasenko <vda.li...@googlemail.com> wrote:
> On Tue, Sep 20, 2016 at 5:44 PM, Martin Townsend
> <mtownsend1...@gmail.com> wrote:
>>>> +++ busybox-1.24.1/networking/ifupdown.c 2016-09-06 13:39:59.288380571
>>>> +0100
>>>> @@ -501,7 +501,7 @@
>>>>  {
>>>>   int result;
>>>>  # if ENABLE_FEATURE_IFUPDOWN_IP
>>>> - result = execute("ip addr flush dev %iface%", ifd, exec);
>>>> + result = execute("ip addr flush dev %iface% [[ label %label%]]", ifd,
>>>> exec);
>>>>   result += execute("ip link set %iface% down", ifd, exec);
>>>>  # else
>>>>   /* result = execute("[[route del default gw %gateway% %iface%]]",
>>>> ifd, exec); */
>>>
>>> This looks correct, applied to git.
>>>
>>> However, the entire ifup/down thing is a bad idea.
>>> It's too inflexible. I suggest using something else.
>>
>> I'm using ifplugd which uses ifup/down it does seem to now work but
>> out of interest what are the alternatives? and I will take a look at
>> them as I have to support an Ethernet gadget interface soon so I have
>> the option of moving to something different.
>
> Everyone seems to be inventing their own ways of dealing with
> the problem of setting up complex networks.

I'm just trying to get BB working with an /etc/network/interfaces
file!  I can't get ifup to properly edit the /var/run/ifstate file.

> Fedora has it's (in)famous NetworkManager. I'm not too familiar with that.

I don't want to add additional software other than what is present in
BB to keep the size of the OS down.

> I dealt with it by hooking necessary daemons into the service manager
> I use, runsvdir.

Presently I don't use runsvdir, but have it planned at some point in the future.

> General idea is described here:
> https://busybox.net/~vda/no_ifup.txt

Looked at it, wouldn't this be the same thing as scripts in
/etc/network/if-*.d directories?  Plus using those directories with
small scripts is modular instead of one big script as mentioned in the
link that can quickly get out of hand.

> Implementation details: some examples of my runsvdir setup are
> in examples/var_service/* in busybox source tree. See README file there.
>
> Specific examples in subdirectories are:
> - DHCP configured interface
> - interface watched by ifplugd (plug/unplug detection, DHCP does not do
> that)
> - add/maintain a ZeroConf IP address
> - watchdog service which tests (pings router) and resets iface
> - "reconfigure me" one-shot "service" which handles the case when
>   IP is static (and more: it is used by other networking services;
>   also it configures iptables)
>
> They can all be present at once, or only a subset of them.
>
> I probably need to add a WPA supplicant service example. I used to use
> openvpn, ppp, and vpnc-managed connections similarly to dhcp
> (by creating a service for them).

Thanks,
Dave
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to