From e04f092232aa2900e2e4bc0dd34419b9366df5df Mon Sep 17 00:00:00 2001
From: Bob Lantz <rlantz@cs.stanford.edu>
Date: Tue, 15 Dec 2009 21:01:19 -0800
Subject: [PATCH] Bah, wasn't using correct command to remove datapaths! Fixed.

---
 cleanup | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/cleanup b/cleanup
index dedfb830..41d56bf1 100755
--- a/cleanup
+++ b/cleanup
@@ -30,6 +30,7 @@ def cleanUpScreens():
 def cleanup():
    print "*** Removing all links of the pattern foo-ethX"
    links = sh( "ip link show | egrep -o '(\w+-eth\w+)'" ).split( '\n' )
+   print links
    for link in links: 
       if link != '': sh( "ip link del " + link )
 
@@ -43,7 +44,7 @@ def cleanup():
    print "*** Removing excess kernel datapaths"
    dps = sh( "ps ax | egrep -o 'dp[0-9]+' | sed 's/dp/nl:/'" ).split( '\n')
    for dp in dps: 
-      if dp != '': sh( 'ip link del ' + link )
+      if dp != '': sh( 'dpctl deldp ' + dp )
 
    print "*** Removing junk from /tmp"
    sh( 'rm -f /tmp/vconn* /tmp/vlogs* /tmp/*.out /tmp/*.log' )
-- 
GitLab