From 1a75d66ad990260e2ba46da68c6ad373bed6b822 Mon Sep 17 00:00:00 2001 From: Simon Biewald Date: Sat, 8 Aug 2020 23:12:51 +0000 Subject: Use netstat on Solaris to gather listening ports --- include/tests_networking | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'include/tests_networking') diff --git a/include/tests_networking b/include/tests_networking index 420f26ea..c8208cd4 100644 --- a/include/tests_networking +++ b/include/tests_networking @@ -512,6 +512,15 @@ ReportException "${TEST_NO}:3" "netstat missing to gather listening ports" fi ;; + Solaris) + if [ -n "${NETSTATBINARY}" ]; then + LogText "Test: Retrieving netstat information to find listening ports" + FIND=$(${NETSTATBINARY} -an -P udp | ${AWKBINARY} '{ if($7=="LISTEN") { print $1"|udp|LISTEN|" }}') + FIND2=$(${NETSTATBINARY} -an -P tcp | ${AWKBINARY} '{ if($7=="LISTEN") { print $1"|tcp|LISTEN|" }}') + else + ReportException "${TEST_NO}:4" "netstat missing to gather listening ports" + fi + ;; *) # Got this exception? Provide your details and output of netstat or any other tool to determine this information. ReportException "${TEST_NO}:2" "Unclear what method to use, to determine listening port information" -- cgit v1.2.3