More fixes for running teston from anywhere
Change-Id: I1c9ca56306698b00801cd9baccf9e1c55cf4ec25
diff --git a/TestON/bin/cleanup.sh b/TestON/bin/cleanup.sh
index d921147..2d78b1e 100755
--- a/TestON/bin/cleanup.sh
+++ b/TestON/bin/cleanup.sh
@@ -1,5 +1,6 @@
#!/bin/bash
# This script will kill any TestON, ssh, and Mininet sessions that are running.
sudo kill -9 `ps -ef | grep "./cli.py" | grep -v grep | awk '{print $2}'`
+sudo kill -9 `ps -ef | grep "bin/teston" | grep -v grep | awk '{print $2}'`
sudo kill -9 `ps -ef | grep "ssh -X" | grep -v grep | awk '{print $2}'`
sudo mn -c
diff --git a/TestON/bin/updatedriver.py b/TestON/bin/updatedriver.py
index bd6974d..ca5c0f2 100644
--- a/TestON/bin/updatedriver.py
+++ b/TestON/bin/updatedriver.py
@@ -349,8 +349,9 @@
try :
self.driverPath = self.configDict['config-driver']['importTypes'][self.driver]['driver-path']
- except KeyError :
- path = re.sub("(bin)$", "", os.getcwd())
+ except KeyError:
+ location = os.path.abspath( os.path.dirname( __file__ ) )
+ path = re.sub( "(bin)$", "", location )
self.driverPath = path + "/lib/updatedriver/"
return self.driverPath