mirror of
https://github.com/vagrant-libvirt/vagrant-libvirt.git
synced 2025-02-25 18:55:27 -06:00
Use grep /proc/net/arp instead of the arp command ...
... and use awk instead of cut
This commit is contained in:
parent
267de056bf
commit
d7da89db92
@ -30,7 +30,7 @@ module VagrantPlugins
|
|||||||
|
|
||||||
# Setup command for retrieving IP address for newly created machine
|
# Setup command for retrieving IP address for newly created machine
|
||||||
# with some MAC address. Get it from dnsmasq leases table
|
# with some MAC address. Get it from dnsmasq leases table
|
||||||
ip_command = %q[ arp -n | grep $mac | cut -d' ' -f 1 ]
|
ip_command = %q[ grep $mac /proc/net/arp | awk '{print $1}' ]
|
||||||
conn_attr[:libvirt_ip_command] = ip_command
|
conn_attr[:libvirt_ip_command] = ip_command
|
||||||
|
|
||||||
@logger.info("Connecting to Libvirt (#{uri}) ...")
|
@logger.info("Connecting to Libvirt (#{uri}) ...")
|
||||||
|
Loading…
Reference in New Issue
Block a user