summaryrefslogtreecommitdiff
path: root/lib/oxidized/model/eos.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/oxidized/model/eos.rb')
-rw-r--r--lib/oxidized/model/eos.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/oxidized/model/eos.rb b/lib/oxidized/model/eos.rb
index 58bb5a9..84ef8cb 100644
--- a/lib/oxidized/model/eos.rb
+++ b/lib/oxidized/model/eos.rb
@@ -29,8 +29,11 @@ class EOS < Oxidized::Model
if vars :enable
post_login do
send "enable\n"
- expect /[pP]assword:\s?$/
- send vars(:enable) + "\n"
+ # Interpret enable: true as meaning we won't be prompted for a password
+ unless vars(:enable).is_a? TrueClass
+ expect /[pP]assword:\s?$/
+ send vars(:enable) + "\n"
+ end
expect /^.+[#>]\s?$/
end
post_login 'terminal length 0'
@@ -39,4 +42,3 @@ class EOS < Oxidized::Model
end
end
-