From f568a45101e8ef78c9bd03f6a8f38b56f1398ded Mon Sep 17 00:00:00 2001 From: o Date: Sat, 10 Aug 2013 19:47:10 +0200 Subject: fix again... --- lib/facter/strongswan_ips.rb | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/facter/strongswan_ips.rb b/lib/facter/strongswan_ips.rb index 8875309..4382d07 100644 --- a/lib/facter/strongswan_ips.rb +++ b/lib/facter/strongswan_ips.rb @@ -3,10 +3,11 @@ Facter.add("strongswan_ips") do bin = ['/usr/sbin/ipsec', '/usr/sbin/strongswan'].find do |f| File.exists?(f) end - break unless bin - output = Facter::Util::Resolution.exec( - "#{bin} statusall | grep -E '^ [0-9a-f]' | sort | uniq") - output = output.to_s.split("\n").collect(&:strip) - output.join(',') unless output.empty? + if bin + output = Facter::Util::Resolution.exec( + "#{bin} statusall | grep -E '^ [0-9a-f]' | sort | uniq") + output = output.to_s.split("\n").collect(&:strip) + output.join(',') unless output.empty? + end end end -- cgit v1.2.3