diff options
author | o <o@immerda.ch> | 2013-08-10 19:47:10 +0200 |
---|---|---|
committer | o <o@immerda.ch> | 2013-08-10 19:47:10 +0200 |
commit | f568a45101e8ef78c9bd03f6a8f38b56f1398ded (patch) | |
tree | ace7b4948f3f3ef60aa327aa71a9a89934dd10ac | |
parent | e69deac032046eb9f8eff69ace835a04cb0491c5 (diff) |
fix again...
-rw-r--r-- | lib/facter/strongswan_ips.rb | 11 |
1 files 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 |