summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjackson-tim <jackson.tim@gmail.com>2016-10-31 17:47:05 -0500
committerGitHub <noreply@github.com>2016-10-31 17:47:05 -0500
commit65007bab6e94c7ba96be177c3fe8e7fdaed9587e (patch)
tree0b8c60ce7e14bd2dd4990076e4294ddf16c7af1c
parent324113866a2e3092d72fb6c34c8530b1870f0a4c (diff)
Update dnos.rb
Handles old DNOS switches that do not allow term length 0 prior to enable, and double exits in case of enable..
-rw-r--r--lib/oxidized/model/dnos.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/oxidized/model/dnos.rb b/lib/oxidized/model/dnos.rb
index 1c31aad..a6cc05f 100644
--- a/lib/oxidized/model/dnos.rb
+++ b/lib/oxidized/model/dnos.rb
@@ -33,15 +33,16 @@ class DNOS < Oxidized::Model
end
cfg :telnet, :ssh do
- post_login 'terminal length 0'
- post_login 'terminal width 0'
if vars :enable
post_login do
send "enable\n"
send vars(:enable) + "\n"
end
end
+ post_login 'terminal length 0'
+ post_login 'terminal width 0'
pre_logout 'exit'
+ pre_logout 'exit'
end
end