Use just awk to parse /proc/net/arp

This commit is contained in:
Kaushal M 2015-02-04 21:05:40 +05:30
parent d7da89db92
commit 06515b87f3

View File

@ -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[ grep $mac /proc/net/arp | awk '{print $1}' ] ip_command = %q[ awk "/$mac/ {print \$1}" /proc/net/arp ]
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}) ...")