From 1ef2c5bcad9b69bcffa6912e069934d1f6f104ec Mon Sep 17 00:00:00 2001 From: Fabio Rehm Date: Wed, 31 Jul 2013 23:00:35 -0300 Subject: [PATCH] Simplify dnsmasq leases lookup --- lib/vagrant-lxc/action/fetch_ip_from_dnsmasq_leases.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/vagrant-lxc/action/fetch_ip_from_dnsmasq_leases.rb b/lib/vagrant-lxc/action/fetch_ip_from_dnsmasq_leases.rb index 9abb110..e9dd8f6 100644 --- a/lib/vagrant-lxc/action/fetch_ip_from_dnsmasq_leases.rb +++ b/lib/vagrant-lxc/action/fetch_ip_from_dnsmasq_leases.rb @@ -37,8 +37,8 @@ module Vagrant ) def read_dnsmasq_leases - LEASES_PATHS.map do |path| - File.read(path) if File.exists?(path) + Dir["{#{LEASES_PATHS.join(',')}}"].map do |file| + File.read(file) end.join("\n") end end