[ovs-dev] [PATCH v2] ovs-tcpdump: add dump_cmd checker before _doexec()

txfh2007 txfh2007 at aliyun.com
Thu Mar 7 14:18:14 UTC 2019


Sorry , I forgot to add signed-off messages.

v1->v2: add signed-off messages.

diff --git a/utilities/ovs-tcpdump.in b/utilities/ovs-tcpdump.in
index 269c252f8..f28ecf5b2 100755
--- a/utilities/ovs-tcpdump.in
+++ b/utilities/ovs-tcpdump.in
@@ -416,6 +416,10 @@ def main():
         print("Error: must at least specify an interface with '-i' option")
         sys.exit(1)

+    if os.system("command -v %s" % (dump_cmd)):
+        print("Error: %s is not installed !!"%dump_cmd)
+        sys.exit(1)
+
     if '-l' not in tcpdargs:
         tcpdargs.insert(0, '-l')

Signed-off-by: Liu Chang <txfh2007 at aliyun.com>






More information about the dev mailing list