testminiwget.sh: use either "ip addr" or "ifconfig -a"
This commit is contained in:
parent
5f85321084
commit
efb6ec1b2f
|
@ -2,7 +2,7 @@
|
||||||
# $Id: testminiwget.sh,v 1.15 2017/11/02 17:36:26 nanard Exp $
|
# $Id: testminiwget.sh,v 1.15 2017/11/02 17:36:26 nanard Exp $
|
||||||
# vim: tabstop=4 shiftwidth=4 noexpandtab
|
# vim: tabstop=4 shiftwidth=4 noexpandtab
|
||||||
# project miniupnp : http://miniupnp.free.fr/
|
# project miniupnp : http://miniupnp.free.fr/
|
||||||
# (c) 2011-2018 Thomas Bernard
|
# (c) 2011-2019 Thomas Bernard
|
||||||
#
|
#
|
||||||
# test program for miniwget.c
|
# test program for miniwget.c
|
||||||
# is usually invoked by "make check"
|
# is usually invoked by "make check"
|
||||||
|
@ -23,12 +23,19 @@ DOWNLOADEDFILE="${TMPD}/downloadedfile"
|
||||||
PORT=
|
PORT=
|
||||||
RET=0
|
RET=0
|
||||||
IPCONFIG=$(which ifconfig)
|
IPCONFIG=$(which ifconfig)
|
||||||
if [ -z "$IPCONFIG" ] ; then
|
IP=$(which ip)
|
||||||
IPCONFIG="/sbin/ifconfig"
|
if [ "$IP" ] ; then
|
||||||
fi
|
if ! $IP addr | grep inet6 ; then
|
||||||
|
HAVE_IPV6=no
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
if [ -z "$IPCONFIG" ] ; then
|
||||||
|
IPCONFIG="/sbin/ifconfig"
|
||||||
|
fi
|
||||||
|
|
||||||
if ! $IPCONFIG -a | grep inet6 ; then
|
if ! $IPCONFIG -a | grep inet6 ; then
|
||||||
HAVE_IPV6=no
|
HAVE_IPV6=no
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
case "$HAVE_IPV6" in
|
case "$HAVE_IPV6" in
|
||||||
|
|
Loading…
Reference in New Issue