Open dupouyleo opened 2 years ago
What do you see if you just run ifconfig
from command line after sudo ifconfig eth0 down
?
If i run ifconfig
the interface doesn't show up. But when i run ip address show
the interface does show up but the flags are different from the interfaces that are not down.
In the results returned by ifcfg.interfaces()
if UP is not present in the flag then it's a downed interface.
ifconfig
is the preferred command on Linux when it exists, and ip
is the fallback. So this result is a bit surprising.
The somewhat strange implementation is in src/ifcfg/__init__.py
:
When i launch a command like :
sudo ifconfig eth0 down
and after I run ifcfg.interfaces() in a new python interpreter the eth0 interface still appears. Is it an expected behavior ?