test.sh: Archlinux: No which; changes on ip,ss commands

This commit is contained in:
Gerhard Rieger 2020-10-30 08:22:08 +01:00
parent 152de04f7c
commit 0c65370ae5
2 changed files with 8 additions and 5 deletions

View file

@ -17,6 +17,9 @@ Testing:
Ubuntu 20.04 requires 2048 bit certificates with OpenSSL Ubuntu 20.04 requires 2048 bit certificates with OpenSSL
Archlinux 2020 has not which command; its ip,ss commands have modified
version strings
####################### V 1.7.3.4: ####################### V 1.7.3.4:
Corrections: Corrections:

10
test.sh
View file

@ -232,16 +232,16 @@ else
fi fi
if type ip >/dev/null 2>&1; then if type ip >/dev/null 2>&1; then
if ip -V |grep -q "^ip utility, iproute2-ss"; then if ip -V |grep -q "^ip utility, iproute2-"; then
IP=$(which ip) IP=$(type -p ip)
else else
unset IP unset IP
fi fi
fi fi
if type ss >/dev/null 2>&1; then if type ss >/dev/null 2>&1; then
if ss -V |grep -q "^ss utility, iproute2-ss"; then if ss -V |grep -q "^ss utility, iproute2-"; then
SS=$(which ss) SS=$(type -p ss)
else else
unset SS unset SS
fi fi
@ -373,7 +373,7 @@ else
SECONDIP6ADDR="[$SECONDIP6ADDR]" SECONDIP6ADDR="[$SECONDIP6ADDR]"
fi fi
TRUE=$(which true) TRUE=$(type true)
#E=-e # Linux #E=-e # Linux
if [ $(echo "x\c") = "x" ]; then E="" if [ $(echo "x\c") = "x" ]; then E=""
elif [ $(echo -e "x\c") = "x" ]; then E="-e" elif [ $(echo -e "x\c") = "x" ]; then E="-e"