From 65007bab6e94c7ba96be177c3fe8e7fdaed9587e Mon Sep 17 00:00:00 2001 From: jackson-tim Date: Mon, 31 Oct 2016 17:47:05 -0500 Subject: Update dnos.rb Handles old DNOS switches that do not allow term length 0 prior to enable, and double exits in case of enable.. --- lib/oxidized/model/dnos.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/oxidized') 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 -- cgit v1.2.1