_mac_addresses: Try ARP cache with "ip neigh" if arp is not available.
This commit is contained in:
parent
f6df76e8ca
commit
87dede96c0
@ -830,7 +830,7 @@ _mac_addresses()
|
||||
) )
|
||||
|
||||
# ARP cache
|
||||
COMPREPLY+=( $( arp -an 2>/dev/null | sed -ne \
|
||||
COMPREPLY+=( $( { arp -an || ip neigh show; } 2>/dev/null | sed -ne \
|
||||
"s/.*[[:space:]]\($re\)[[:space:]].*/\1/p" -ne \
|
||||
"s/.*[[:space:]]\($re\)[[:space:]]*$/\1/p" ) )
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user