diff options
author | broxio <madpenguin7@gmail.com> | 2016-05-16 13:08:32 +0800 |
---|---|---|
committer | broxio <madpenguin7@gmail.com> | 2016-05-16 13:08:32 +0800 |
commit | 3ff3b0d63c16a650c7ff453ec901244d08ccba7f (patch) | |
tree | 54d6228b88741f9c56b483e6831a42b3a1e94024 | |
parent | ed360a3ec0cc3e61d6cfc426e106b6e188561830 (diff) |
Update acos.rb
Update enable logic to support enable without password on ACOS device.
-rw-r--r-- | lib/oxidized/model/acos.rb | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/oxidized/model/acos.rb b/lib/oxidized/model/acos.rb index e686a59..fa38a60 100644 --- a/lib/oxidized/model/acos.rb +++ b/lib/oxidized/model/acos.rb @@ -58,16 +58,18 @@ class ACOS < Oxidized::Model end cfg :telnet, :ssh do - # preferred way to handle additional passwords - if vars :enable - post_login do + post_login do + if vars :enable send "enable\r\n" send vars(:enable) + "\r\n" + else + send "enable\r\n" + send "\r\n" end end - post_login "en\r\n" post_login 'terminal length 0' - post_login 'terminal width 0' + post_login 'terminal width 0' pre_logout "exit\nexit\nY\r\n" end + end |