Don't try to modprobe tun if it's built-in (e.g. Ubuntu.)

This commit is contained in:
Bob Lantz
2010-08-19 14:42:33 -07:00
parent 05c2d669a9
commit e900a16caf
+2 -1
View File
@@ -471,7 +471,8 @@ class UserSwitch( Switch ):
@staticmethod
def setup():
"Ensure any dependencies are loaded; if not, try to load them."
moduleDeps( add=TUN )
if not os.path.exists( '/dev/net/tun' ):
moduleDeps( add=TUN )
def start( self, controllers ):
"""Start OpenFlow reference user datapath.