additional ifupdown problems

David Henderson dhenderson at digital-pipe.com
Tue Sep 20 18:36:20 UTC 2016


Aside from ownership/permissions, can anyone think of why 'ifup' does
not write to this file?  Regression on BB code perhaps?  Can any
confirm theirs actuallys writes to this file?

Thanks,
Dave


On 9/20/16, David Henderson <dhenderson at digital-pipe.com> wrote:
> That's what my research has yielded as well, however, it doesn't
> appear that /var/run/ifstate is getting written to.  I check the
> ownership/permissions of the file:
>
> root:root 644
>
> I since changed it to mimic yours and attempted an 'ifup' again - no
> luck, same message.  I then tried adding the 'eth0=eth0' to the file
> and calling 'ifdown eth0' which worked like a charm.  So it appears
> that the problem lies with 'ifup'?  Also, the 'ifstate' file is
> dynamically being created during the boot cycle (most likely by the
> 'ifup -a' call during boot), so I'm assuming the file ownership and
> permissions are getting set there.
>
> Thanks,
> Dave
>
>
> On 9/20/16, Martin Townsend <mtownsend1973 at gmail.com> wrote:
>> Hi David,
>>
>> On Tue, Sep 20, 2016 at 4:03 PM, David Henderson
>> <dhenderson at digital-pipe.com> wrote:
>>> Good morning everyone!  During the boot of the OS, an 'ifup -a' is
>>> called to bring all the configured adapters online via the
>>> /etc/network/interfaces file.  Once the device is up and running, I
>>> can see the proper configurations via an 'ifconfig' call.  However,
>>> when I issue an 'ifdown eth0' call, I get the following error:
>>>
>>> ifdown: interface eth0 not configured
>>>
>>> Checking with the 'ifconfig' confirms that no action was taken and
>>> that the adapter is still up and running.  Running an 'ifdown -f eth0'
>>> achieves the desired goals, but why do I need to force this?  Checking
>>> the /var/run/ifstate file shows that it is 0 bytes at all times (e.g.
>>> right after a reboot, after tinkering with ifup/down, etc).  Also,
>>> once the configuration is removed and an 'ifup -v eth0' is called,
>>> here's what I get:
>>>
>>> run-parts /etc/network/if-pre-up.d
>>> ip addr add 192.168.0.25/22 dev eth0 label eth0
>>> ip link setup eth0 up
>>> ip route add default via 192.168.0.1 dev eth0
>>> ip: RTNETLINK answers: File exists
>>>
>>> I've tried calling a "ip addr flush dev eth0" to see if that would
>>> resolve the problem, but didn't work.  Also keep in mind that I can
>>> not run an 'strace' since the machine I'm working on (or more
>>> precisely developing on) does NOT have a current Internet connection.
>>>
>>> As a side note to one of my other posts, it doesn't appear that any
>>> other if-*.d directories are getting processed (which would explain
>>> why my test script isn't being called).  Is this due to the error
>>> preventing further processing, or are the other directories getting
>>> skipped for some other reason?
>>>
>>> Thanks,
>>> Dave
>>> _______________________________________________
>>> busybox mailing list
>>> busybox at busybox.net
>>> http://lists.busybox.net/mailman/listinfo/busybox
>>
>>
>> I'm sure that /var/run/ifstate must contain the name of the currently
>> configured network interfaces otherwise ifdown will not work so I
>> would start there.   On my system /var/run is in tmpfs and is a link
>> to /run as should have 777 permissions.
>>  df -h /var/run
>> Filesystem      Size  Used Avail Use% Mounted on
>> tmpfs           503M  8.5M  495M   2% /run
>> ls -al /var/run
>> lrwxrwxrwx 1 root root 6 Sep 19 17:28 /var/run -> ../run
>>
>> Is there anything in dmesg about ifstate?  can you write to ifstate
>>
>> echo "eth0=eth0" > /var/run/ifstate
>> if so does ifdown now work?
>>
>> -Martin
>>
>


More information about the busybox mailing list