[DRE-commits] [vagrant-libvirt] 50/104: Fix NFS network discovery

Antonio Terceiro terceiro at moszumanska.debian.org
Sun Apr 24 13:55:44 UTC 2016


This is an automated email from the git hooks/post-receive script.

terceiro pushed a commit to annotated tag 0.0.11
in repository vagrant-libvirt.

commit 01eb354d89055d8bc3b597453625ccbb80c2fe0d
Author: Dominic Cleal <dcleal at redhat.com>
Date:   Sun Jun 16 20:26:35 2013 +0100

    Fix NFS network discovery
---
 lib/vagrant-libvirt/action/prepare_nfs_settings.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/vagrant-libvirt/action/prepare_nfs_settings.rb b/lib/vagrant-libvirt/action/prepare_nfs_settings.rb
index bc0ffb7..f6ac990 100644
--- a/lib/vagrant-libvirt/action/prepare_nfs_settings.rb
+++ b/lib/vagrant-libvirt/action/prepare_nfs_settings.rb
@@ -41,7 +41,7 @@ module VagrantPlugins
             xml=Nokogiri::XML(domain.to_xml)
             networkname = xml.xpath('/domain/devices/interface/source').first.attributes['network'].value.to_s
             puts "network name = #{networkname}"
-            net = env[:libvirt_compute].list_networks.map {|netw| netw if netw[:name] == networkname}.first
+            net = env[:libvirt_compute].list_networks.find {|netw| netw[:name] == networkname}
           end
           # FIXME better implement by libvirt xml parsing
           `ip addr show | grep -A 2 #{net[:bridge_name]} | grep -i 'inet ' | tr -s ' ' | cut -d' ' -f3 | cut -d'/' -f 1`.chomp

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/vagrant-libvirt.git



More information about the Pkg-ruby-extras-commits mailing list