From 02f47103e3549df9831409bd9a3984257b48885c Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Thu, 1 Nov 2007 15:53:52 +0000 Subject: Fix some more, #180888. --- net.Linux/arping.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/net.Linux/arping.sh b/net.Linux/arping.sh index 4bfb151c..2d8723b5 100644 --- a/net.Linux/arping.sh +++ b/net.Linux/arping.sh @@ -24,10 +24,13 @@ arping_address() { [ -z "${w}" ] && w=${arping_wait:-5} if type arping2 >/dev/null 2>&1; then - [ -z "$(_get_inet_address)" ] && opts="${opts} -0" - [ -n "${spoof}" ] && opts="${opts} -S ${spoof}" + if [ -n "${spoof}" ]; then + opts="${opts} -S ${spoof}" + else + [ -z "$(_get_inet_address)" ] && opts="${opts} -0" + fi while [ ${w} -gt 0 -a -z "${foundmac}" ]; do - foundmac="$(arping2 ${opts} -r -c 1 -0 -i "${IFACE}" "${ip}" 2>/dev/null | \ + foundmac="$(arping2 ${opts} -r -c 1 -i "${IFACE}" "${ip}" 2>/dev/null | \ sed -e 'y/abcdef/ABCDEF/')" w=$((${w} - 1)) done -- cgit v1.2.3