Method: Specinfra::Command::Solaris::Base::Host.check_is_reachable
- Defined in:
- lib/specinfra/command/solaris/base/host.rb
permalink .check_is_reachable(host, port, proto, timeout) ⇒ Object
[View source]
3 4 5 6 7 8 9 |
# File 'lib/specinfra/command/solaris/base/host.rb', line 3 def check_is_reachable(host, port, proto, timeout) if port.nil? "ping -n #{escape(host)} #{escape(timeout)}" else "nc -vvvvz#{escape(proto[0].chr)} -w #{escape(timeout)} #{escape(host)} #{escape(port)}" end end |