node: verify telnet installation for controller checking
Reported-by: Julius Bachnick https://mailman.stanford.edu/pipermail/mininet-discuss/2012-November/001349.html
This commit is contained in:
@@ -995,6 +995,12 @@ class Controller( Node ):
|
||||
|
||||
def checkListening( self ):
|
||||
"Make sure no controllers are running on our port"
|
||||
# Verify that Telnet is installed first:
|
||||
out, err, returnCode = errRun( "which telnet" )
|
||||
if 'telnet' not in out or returnCode != 0:
|
||||
raise Exception( "Error running telnet to check for listening "
|
||||
"controllers; please check that it is "
|
||||
"installed." )
|
||||
listening = self.cmd( "echo A | telnet -e A %s %d" %
|
||||
( self.ip, self.port ) )
|
||||
if 'Unable' not in listening:
|
||||
|
||||
Reference in New Issue
Block a user