ifdown issue.
Rob Kramer
rob at solution-space.com
Fri Nov 23 07:26:14 UTC 2018
On a new Yocto build (with busybox 1.29) I noticed that 'ifdown eth0'
didn't work anymore, i.e. would just report:
ifdown: interface eth0 not configured
My ifstate file typically has two entries:
lo=lo
eth0=eth0
The issue is that ifupdown.c only seems to read a single line in the
ifstate file. I'm not familiar with the code, but it seems
xmalloc_fgets() doesn't break at newlines, and as such the loop in
read_iface_state() won't work.
If I change the code to use xmalloc_fgets_str(), it works as expectected
(see attached patch).
I'm not sure if this is the correct way to fix my issue, especially
since nobody has reported this yet :)
Cheers!
Rob
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-ifupdown-Fix-ifdown.patch
Type: text/x-patch
Size: 792 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/busybox/attachments/20181123/931b3ef6/attachment.bin>
More information about the busybox
mailing list