diff --git a/common.sh b/common.sh index 899af77da647083ce5b3abd5d8800d7b5a5002f3..6c84cd856efd90d815e14d264ab7a1e89689b48f 100644 --- a/common.sh +++ b/common.sh @@ -58,7 +58,7 @@ function tryWget(){ PROXY="http://${phost}:${pport}" fi - if which wget &>/dev/null; then + if which wget &> /dev/null; then WGETBIN="$(which wget)" else WGETBIN="${PREFIX}/bin/wget" @@ -82,8 +82,8 @@ function getNetworkInterface() for interface in $(/sbin/route | grep default | awk '{print $NF}'); do # Send ICMP ECHO_REQUEST to root server I or J - if ping -c 1 -I ${interface} 192.36.148.17 > /dev/null 2>&1 || - ping -c 1 -I ${interface} 192.58.128.30 > /dev/null 2>&1 ; then + if ping -c 1 -I ${interface} 192.36.148.17 &> /dev/null || + ping -c 1 -I ${interface} 192.58.128.30 &> /dev/null ; then break fi done