Commit 2adff56e by Michael DeHaan

Merge pull request #854 from sfromm/fixes

A couple fixes for setup module
parents 00c28e28 c4ce5f94
......@@ -453,8 +453,13 @@ class LinuxNetwork(Network):
ipv4_address = None,
ipv6_address = None
)
output = subprocess.Popen(['ip','addr'], stdout=subprocess.PIPE).communicate()[0]
ipbin = '/sbin/ip'
if not os.path.exists(ipbin):
if os.path.exists('/usr/sbin/ip'):
ipbin = '/usr/sbin/ip'
else:
return interfaces, ips
output = subprocess.Popen([ipbin, 'addr', 'show'], stdout=subprocess.PIPE).communicate()[0]
for line in output.split('\n'):
if line:
words = line.split()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment