From 431958899c17ab53ea1a91ddbfe5ecfe6adbe5ac Mon Sep 17 00:00:00 2001 From: Fabio Rehm Date: Sun, 10 Mar 2013 22:15:16 -0300 Subject: [PATCH] Fix code related to Container#assigned_ip retryal attempts --- lib/vagrant-lxc/container.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/vagrant-lxc/container.rb b/lib/vagrant-lxc/container.rb index d1c0eaa..036b951 100644 --- a/lib/vagrant-lxc/container.rb +++ b/lib/vagrant-lxc/container.rb @@ -116,7 +116,7 @@ module Vagrant # See: http://programminglinuxblog.blogspot.com.br/2007/11/detecting-ip-address-from-mac-address.html unless ip = get_container_ip_from_arp(mac_addr) # Ping subnet and try to get ip again - ping_subnet! and raise LXC::Errors::ExecuteError + ping_subnet! end end ip @@ -147,7 +147,10 @@ module Vagrant raise LXC::Errors::UnknownLxcBridgeAddress unless File.read(LXC_DEFAULTS_PATH) =~ /^LXC_ADDR\="?([0-9.]+)"?.*$/ - raw 'fping', '-c', '1', '-g', '-q', "#{$1}/24" + cmd = ['fping', '-c', '1', '-g', '-q', "#{$1}/24"] + raw(*cmd) + + raise LXC::Errors::ExecuteError, :command => cmd.inspect end # TODO: Review code below this line, it was pretty much a copy and paste from VirtualBox base driver