From d7da89db92725fc1f5ecca081a4401d826944bd8 Mon Sep 17 00:00:00 2001 From: Kaushal M Date: Mon, 2 Feb 2015 08:56:25 +0530 Subject: [PATCH] Use grep /proc/net/arp instead of the arp command ... ... and use awk instead of cut --- lib/vagrant-libvirt/action/connect_libvirt.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/vagrant-libvirt/action/connect_libvirt.rb b/lib/vagrant-libvirt/action/connect_libvirt.rb index 85add62..e18cfc3 100644 --- a/lib/vagrant-libvirt/action/connect_libvirt.rb +++ b/lib/vagrant-libvirt/action/connect_libvirt.rb @@ -30,7 +30,7 @@ module VagrantPlugins # Setup command for retrieving IP address for newly created machine # 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 @logger.info("Connecting to Libvirt (#{uri}) ...")