Method: Specinfra::Command::Solaris::Base::Ipnat.check_has_rule
- Defined in:
- lib/specinfra/command/solaris/base/ipnat.rb
permalink .check_has_rule(rule) ⇒ Object
[View source]
3 4 5 6 |
# File 'lib/specinfra/command/solaris/base/ipnat.rb', line 3 def check_has_rule(rule) regexp = "^#{rule}$" "ipnat -l 2> /dev/null | grep -- #{escape(regexp)}" end |