-
-
Notifications
You must be signed in to change notification settings - Fork 269
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add command ip support for linux platform #58
Conversation
@@ -63,7 +144,8 @@ def find_interfaces(self, targets=None): | |||
# - the adapter name/device associated with this, if any, | |||
# - the MAC address, if any | |||
|
|||
output = subprocess.check_output(["ifconfig"], stderr=subprocess.STDOUT, universal_newlines=True) | |||
#output = subprocess.check_output(["ifconfig"], stderr=subprocess.STDOUT, universal_newlines=True) | |||
output = subprocess.check_output(["ip addr"], stderr=subprocess.STDOUT, universal_newlines=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this line stay unchanged?
Please address my inline comment, then I'm happy to merge this. |
Yes indeed, my bad, shouldn't change.. I fix that. |
Add command ip support for linux platform
Released as 2.1.0. @lublud Please install and make sure it works for you. |
Working fine for me, thanks! |
It looks like there are more uses of
|
@tkelman PRs welcome! |
Not sure what the best solution would be - locally changing |
What about using |
I like that idea. I guess it would also likely be needed on lines 193, 196, edit: 451 and 472 are for osx, and there's an easier fix using |
Probably best to check once and set a variable with the command to use, On Sun, Jan 3, 2016 at 4:16 AM Tony Kelman notifications@github.com wrote:
|
Being a arch linux user,
ip
has been chosen overifconfig
deprecated.I thus changed a bit the code so I can use it with
ip
.Tested only on arch linux.