Now ovs-tcpdump will check for an OVS_RUNDIR environment variable and
if present, use it instead of the default RUNDIR. This is useful when
used in conjunction with OVS_PAUSE_TEST while running the test suite.

Signed-off-by: Mike Pattrick <[email protected]>

--
V2: Removed unnecessary conditional

Signed-off-by: Mike Pattrick <[email protected]>
---
 utilities/ovs-tcpdump.in | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/utilities/ovs-tcpdump.in b/utilities/ovs-tcpdump.in
index b3dc65440..7fd26e405 100755
--- a/utilities/ovs-tcpdump.in
+++ b/utilities/ovs-tcpdump.in
@@ -406,7 +406,8 @@ def py_which(executable):
 
 
 def main():
-    db_sock = 'unix:@RUNDIR@/db.sock'
+    rundir = os.environ.get('OVS_RUNDIR', '@RUNDIR@')
+    db_sock = 'unix:%s' % os.path.join(rundir, "db.sock")
     interface = None
     tcpdargs = []
 
-- 
2.31.1

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to