Skip to content
Snippets Groups Projects
Commit ab312967 authored by Bob Lantz's avatar Bob Lantz
Browse files

Added pathCheck for additional sanity when OF/OVS isn't installed.

parent 2c07d62b
No related branches found
No related tags found
No related merge requests found
......@@ -2,6 +2,7 @@
from mininet.util import quietRun
from mininet.log import info, error, debug
from os import environ
def lsmod():
"Return output of lsmod."
......@@ -54,3 +55,12 @@ def moduleDeps( subtract=None, add=None ):
exit( 1 )
else:
debug( '*** ' + mod + ' already loaded\n' )
def pathCheck( *args ):
"Make sure each program in *args can be found in $PATH."
for arg in args:
if not quietRun( 'which ' + arg ):
error( 'Cannot find required executable %s -'
' is it installed somewhere in your $PATH?\n(%s)\n' %
( arg, environ[ 'PATH' ] ) )
exit( 1 )
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment