From 3047ef6a22c7f3b41b217273a3e090f70e1fb889 Mon Sep 17 00:00:00 2001 From: "Manuel Amador (Rudd-O)" Date: Mon, 4 Oct 2010 14:52:01 -0700 Subject: [PATCH] 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 --- setup/bindir/cloud-setup-databases.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setup/bindir/cloud-setup-databases.in b/setup/bindir/cloud-setup-databases.in index 3499a1512cc..0110a2d9be2 100755 --- a/setup/bindir/cloud-setup-databases.in +++ b/setup/bindir/cloud-setup-databases.in @@ -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()