testminiwget.sh: display network confing in case of error

This commit is contained in:
Thomas Bernard 2017-11-02 18:11:29 +01:00
parent dfb3115bc3
commit 6600c52b67
1 changed files with 6 additions and 0 deletions

View File

@ -21,6 +21,10 @@ EXPECTEDFILE="${TMPD}/expectedfile"
DOWNLOADEDFILE="${TMPD}/downloadedfile"
PORT=
RET=0
IPCONFIG=$(which ifconfig)
if [ -z "$IPCONFIG" ] ; then
IPCONFIG="/sbin/ifconfig"
fi
case "$HAVE_IPV6" in
n|no|0)
@ -46,6 +50,8 @@ while [ -z "$PORT" ]; do
done
if [ "$PORT" = "*** ERROR ***" ]; then
echo "HTTP test server error"
echo "Network config :"
$IPCONFIG -a
exit 2
fi
echo "Test HTTP server is listening on $PORT"