class Specinfra::Command::Redhat::V5::Iptables

Public Class Methods

check_has_rule(rule, table=nil, chain=nil) click to toggle source
# File lib/specinfra/command/redhat/v5/iptables.rb, line 3
def check_has_rule(rule, table=nil, chain=nil)
  cmd =  "iptables-save"
  cmd += " -t #{escape(table)}" if table
  cmd += " | grep -- #{escape(rule)}"
  cmd
end