mirror of https://github.com/apache/cloudstack.git
bug 6378: Port bug fix for ifaces with no ip address into 2.1.x -- very complicated to do after alexs commit "More file changes" that merged a giant batch of patches
This commit is contained in:
parent
0b74b3d684
commit
3047ef6a22
|
|
@ -154,7 +154,8 @@ def ifaces():
|
|||
|
||||
def ip(iface):
|
||||
status,lines = commands.getstatusoutput('LANG=C /sbin/ip address show %s'%iface)
|
||||
assert status == 0
|
||||
if status != 0: return False
|
||||
# 7249f168 (Alex Huang 2010-09-09 11:52:12 -0700 175) # used to say: assert status == 0 but it caused a bug in ifaces without IP
|
||||
lines = [ l for l in lines.splitlines() if l.startswith(' inet ') ]
|
||||
if not lines: return None
|
||||
toks = lines[0].split()
|
||||
|
|
|
|||
Loading…
Reference in New Issue