summaryrefslogtreecommitdiff
path: root/lib/oxidized/input
diff options
context:
space:
mode:
Diffstat (limited to 'lib/oxidized/input')
-rw-r--r--lib/oxidized/input/ssh.rb2
-rw-r--r--lib/oxidized/input/telnet.rb1
2 files changed, 3 insertions, 0 deletions
diff --git a/lib/oxidized/input/ssh.rb b/lib/oxidized/input/ssh.rb
index 11b0ae6..a2e049c 100644
--- a/lib/oxidized/input/ssh.rb
+++ b/lib/oxidized/input/ssh.rb
@@ -85,6 +85,7 @@ module Oxidized
end
ch.request_pty (@pty_options) do |_ch, success_pty|
raise NoShell, "Can't get PTY" unless success_pty
+
ch.send_channel_request 'shell' do |_ch, success_shell|
raise NoShell, "Can't get shell" unless success_shell
end
@@ -112,6 +113,7 @@ module Oxidized
sleep 0.1
match = regexps.find { |regexp| @output.match regexp }
return match if match
+
true
end
end
diff --git a/lib/oxidized/input/telnet.rb b/lib/oxidized/input/telnet.rb
index 63d811f..17fad53 100644
--- a/lib/oxidized/input/telnet.rb
+++ b/lib/oxidized/input/telnet.rb
@@ -34,6 +34,7 @@ module Oxidized
def cmd cmd_str, expect = @node.prompt
return send(cmd_str + "\n") unless expect
+
Oxidized.logger.debug "Telnet: #{cmd_str} @#{@node.name}"
args = { 'String' => cmd_str,
'Match' => expect,