aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2007-11-01 15:53:52 +0000
committerRoy Marples <roy@marples.name>2007-11-01 15:53:52 +0000
commit02f47103e3549df9831409bd9a3984257b48885c (patch)
treeeccf6e230876ac1e63ca7dee8ea5a0bcb56a27da
parentc3690f2d1be67b032a29aa9b4aedf64558e040f9 (diff)
Fix some more, #180888.
-rw-r--r--net.Linux/arping.sh9
1 files 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