diff --git a/mininet/link.py b/mininet/link.py index 44c590b46c713d5cba6ce9e79646c853bc869f50..b1dfbfcf46062c0df097ac16ce16d3c70157a283 100644 --- a/mininet/link.py +++ b/mininet/link.py @@ -122,6 +122,7 @@ def isUp( self, setUp=False ): "Return whether interface is up" if setUp: cmdOutput = self.ifconfig( 'up' ) + # no output indicates success if cmdOutput: error( "Error setting %s up: %s " % ( self.name, cmdOutput ) ) return False diff --git a/mininet/net.py b/mininet/net.py index 2d44af31799847ffbc8a82d1275b1c458951d9c8..d082b00d2ee7ece2339acc2045a9a275fceec3a1 100755 --- a/mininet/net.py +++ b/mininet/net.py @@ -384,7 +384,7 @@ def buildFromTopo( self, topo=None ): srcPort, dstPort = topo.port( srcName, dstName ) self.addLink( src, dst, srcPort, dstPort, **params ) info( '(%s, %s) ' % ( src.name, dst.name ) ) - + info( '\n' ) def configureControlNetwork( self ): diff --git a/mininet/node.py b/mininet/node.py index 333dfe70c28c3fa633608bb1e217541a9017f67e..b4c0013481b6e7efbcf5b60bf608aa9dce562ce5 100644 --- a/mininet/node.py +++ b/mininet/node.py @@ -1190,7 +1190,7 @@ def start( self, controllers ): args.append( self.opts ) logfile = '/tmp/ivs.%s.log' % self.name - + self.cmd( ' '.join(args) + ' >' + logfile + ' 2>&1 </dev/null &' ) def stop( self ): diff --git a/mininet/util.py b/mininet/util.py index b1dc4920e9d3b4cdb51789431babeca1045e28b9..69d31273f21ed858d35aca3004c74f3e17d6597e 100644 --- a/mininet/util.py +++ b/mininet/util.py @@ -192,6 +192,8 @@ def moveIntfNoRetry( intf, dstNode, srcNode=None, printError=False ): cmdOutput = srcNode.cmd( cmd ) else: cmdOutput = quietRun( cmd ) + # If ip link set does not produce any output, then we can assume + # that the link has been moved successfully. if cmdOutput: if printError: error( '*** Error: moveIntf: ' + intf +