Sha256: ec9a83355144e891f5a00db6dbf1f54e260568f95e9a2c687119942e94e4f3cb

Contents?: true

Size: 444 Bytes

Versions: 20

Compression:

Stored size: 444 Bytes

Contents

Facter.add(:iptables_persistent_version) do
  confine :operatingsystem => %w{Debian Ubuntu}
  setcode do
    # Throw away STDERR because dpkg >= 1.16.7 will make some noise if the
    # package isn't currently installed.
    cmd = "dpkg-query -Wf '${Version}' iptables-persistent 2>/dev/null"
    version = Facter::Util::Resolution.exec(cmd)

    if version.nil? or !version.match(/\d+\.\d+/)
      nil
    else
      version
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
freighthop-0.6.1 modules/firewall/lib/facter/iptables_persistent_version.rb
freighthop-0.6.0 modules/firewall/lib/facter/iptables_persistent_version.rb
freighthop-0.5.2 modules/firewall/lib/facter/iptables_persistent_version.rb
freighthop-0.5.1 modules/firewall/lib/facter/iptables_persistent_version.rb
freighthop-0.5.0 modules/firewall/lib/facter/iptables_persistent_version.rb
freighthop-0.4.1 modules/firewall/lib/facter/iptables_persistent_version.rb
freighthop-0.4.0 modules/firewall/lib/facter/iptables_persistent_version.rb
freighthop-0.3.3 modules/firewall/lib/facter/iptables_persistent_version.rb
freighthop-0.3.2 modules/firewall/lib/facter/iptables_persistent_version.rb
freighthop-0.3.1 modules/firewall/lib/facter/iptables_persistent_version.rb
freighthop-0.3.0 modules/firewall/lib/facter/iptables_persistent_version.rb
freighthop-0.2.1 modules/firewall/lib/facter/iptables_persistent_version.rb
freighthop-0.2.0 modules/firewall/lib/facter/iptables_persistent_version.rb
freighthop-0.1.0 modules/firewall/lib/facter/iptables_persistent_version.rb
freighthop-0.0.6 modules/firewall/lib/facter/iptables_persistent_version.rb
freighthop-0.0.5 modules/firewall/lib/facter/iptables_persistent_version.rb
freighthop-0.0.4 modules/firewall/lib/facter/iptables_persistent_version.rb
freighthop-0.0.3 modules/firewall/lib/facter/iptables_persistent_version.rb
freighthop-0.0.2 modules/firewall/lib/facter/iptables_persistent_version.rb
freighthop-0.0.1 modules/firewall/lib/facter/iptables_persistent_version.rb