[DRE-commits] [vagrant-libvirt] 30/67: fix checking string
Antonio Terceiro
terceiro at moszumanska.debian.org
Sun Apr 24 13:56:03 UTC 2016
This is an automated email from the git hooks/post-receive script.
terceiro pushed a commit to annotated tag 0.0.14
in repository vagrant-libvirt.
commit 50b15b91ee14a2d3848d95941ea2ef50a50feabe
Author: dima <pronix.service at gmail.com>
Date: Mon Dec 16 20:14:58 2013 +0100
fix checking string
---
lib/vagrant-libvirt/action/connect_libvirt.rb | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/lib/vagrant-libvirt/action/connect_libvirt.rb b/lib/vagrant-libvirt/action/connect_libvirt.rb
index 575dd94..e542581 100644
--- a/lib/vagrant-libvirt/action/connect_libvirt.rb
+++ b/lib/vagrant-libvirt/action/connect_libvirt.rb
@@ -69,9 +69,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 = "LEASES=$(find /var/lib/libvirt/dnsmasq/ /var/lib/misc/ -name '*leases');"
- ip_command << "if [ -n $LEASES ]; then"
- ip_command << "grep $mac $LEASES | awk '{ print $3 }'"
- ip_command << "fi"
+ ip_command << "[[ $LEASES ]] && grep $mac $LEASES | awk '{ print $3 }'"
conn_attr[:libvirt_ip_command] = ip_command
@logger.info("Connecting to Libvirt (#{uri}) ...")
--
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