Add stderr for NETW-3004

This commit is contained in:
Michael Boelen 2017-01-24 19:28:06 +01:00
parent 145e1164be
commit d2a80ed789

View File

@ -212,27 +212,27 @@
################################################################################# #################################################################################
# #
# Test : NETW-3004 # Test : NETW-3004
# Description : Find available network interfaces on FreeBSD and others # Description : Find available network interfaces
Register --test-no NETW-3004 --weight L --network NO --category security --description "Search available network interfaces" Register --test-no NETW-3004 --weight L --network NO --category security --description "Search for available network interfaces"
if [ ${SKIPTEST} -eq 0 ]; then if [ ${SKIPTEST} -eq 0 ]; then
FIND="" FIND=""
N=0 N=0
case ${OS} in case ${OS} in
AIX) AIX)
FIND=`${IFCONFIGBINARY} -a | ${GREPBINARY} "flags=" | ${AWKBINARY} -F ":" '{ print $1 }'` FIND=$(${IFCONFIGBINARY} -a 2> /dev/null | ${GREPBINARY} "flags=" | ${AWKBINARY} -F ":" '{ print $1 }')
;; ;;
Linux) Linux)
if [ ! "${IPBINARY}" = "" ]; then if [ ! "${IPBINARY}" = "" ]; then
FIND=`${IPBINARY} link show | ${GREPBINARY} "^[0-9]" | ${AWKBINARY} '{ print $2 }' | ${SEDBINARY} 's/://g'` FIND=$(${IPBINARY} link show 2> /dev/null | ${GREPBINARY} "^[0-9]" | ${AWKBINARY} '{ print $2 }' | ${SEDBINARY} 's/://g')
elif [ ! "${IFCONFIGBINARY}" = "" ]; then elif [ ! "${IFCONFIGBINARY}" = "" ]; then
FIND=`${IFCONFIGBINARY} -a | ${AWKBINARY} '{ if ( $2 == "Link" ) { print $1 }}'` FIND=$(${IFCONFIGBINARY} -a 2> /dev/null | ${AWKBINARY} '{ if ( $2 == "Link" ) { print $1 }}')
fi fi
;; ;;
DragonFly|FreeBSD|macOS|NetBSD) DragonFly|FreeBSD|macOS|NetBSD)
FIND=`${IFCONFIGBINARY} -l` FIND=$(${IFCONFIGBINARY} -l 2> /dev/null)
;; ;;
OpenBSD|Solaris) OpenBSD|Solaris)
FIND=`${IFCONFIGBINARY} -a | ${GREPBINARY} "flags=" | ${AWKBINARY} -F ": " '{ print $1 }'` FIND=$(${IFCONFIGBINARY} -a 2> /dev/null | ${GREPBINARY} "flags=" | ${AWKBINARY} -F ": " '{ print $1 }')
;; ;;
*) *)
# Having a system currently unsupported? Share your details to determine network interfaces # Having a system currently unsupported? Share your details to determine network interfaces