This commit is contained in:
Rob Pearce 2022-06-28 10:14:59 +10:00
parent 7e4494fa2a
commit f1b8a206c5
1 changed files with 5 additions and 5 deletions

View File

@ -1341,11 +1341,11 @@ function canping() {
# send new arp req
for n in ${!ip[@]}; do
if [[ -n ${ip[$n]} ]]; then
if [[ -e $ARPING ]]; then
if [[ -e $ARPING ]]; then
${ARPING} -c10 -W0.2 -w4 -C1 -q ${ip[$n]} 2>/dev/null &
else
else
ping -c 1 -w 1 -q ${ip[$n]} 2>/dev/null &
fi
fi
fi
done
@ -1357,7 +1357,7 @@ function canping() {
for n in ${!ip[@]}; do
if [[ -n ${ip[$n]} ]]; then
arpres=$(arp -n ${ip[$n]} 2>/dev/null)
arprv=$?
arprv=$?
mac=$(echo "$arpres" | egrep -v "Host|xpired" | awk '{print $2}')
[[ $mac == *:* ]] && success=1
fi
@ -1885,7 +1885,7 @@ done
shift $((OPTIND - 1))
if [[ ! -e $ARPING ]]; then
info "Warning: arping binary '$ARPING' not found, will use ping instead"
info "Warning: arping binary '$ARPING' not found, will use ping instead"
fi
if [[ -n $influxdb ]]; then