Report abuse

1
2
3
4
5
6
7
# Returns true or false depending on if the OpenBSD
# packet filter is running or not
Facter.add("pf_running") do
  setcode do
    (%x{/sbin/pfctl -si}.chomp =~ /^status.+enabled/i) ? "running" : "stopped"
  end
end