From 2a17b5c9e6746cff71eff0e0a9c6f822eb6645f8 Mon Sep 17 00:00:00 2001 From: Fangyin Hu Date: Thu, 22 Jun 2017 02:32:56 -0700 Subject: [PATCH] Fix the tcpdump start issue. Change-Id: I529899bdc031e8d5e367bad5a829857c2c83a3ba Signed-off-by: Fangyin Hu --- nsh_sfc_tests/sfc_scripts/start_tcpdump.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/nsh_sfc_tests/sfc_scripts/start_tcpdump.sh b/nsh_sfc_tests/sfc_scripts/start_tcpdump.sh index 9d51e667bd..46f8217e26 100755 --- a/nsh_sfc_tests/sfc_scripts/start_tcpdump.sh +++ b/nsh_sfc_tests/sfc_scripts/start_tcpdump.sh @@ -6,6 +6,11 @@ PWDDIR=$(pwd) cd ${ROOTDIR}/nsh_sfc_tests/sfc_scripts/ sudo rm -f temp_packet.pcap -sudo tcpdump -i $1 -c 1 -w temp_packet.pcap dst host $2 >/dev/null 2>&1 & +sudo /usr/sbin/tcpdump -i $1 -c 1 -w temp_packet.pcap dst host $2 & + +if [ ! $? -eq 0 ]; then + echo "Start the tcpdump failed!!!" + exit 1 +fi cd ${PWDDIR} -- 2.16.6