diff options
Diffstat (limited to 'lib/oxidized')
-rw-r--r-- | lib/oxidized/model/edgeswitch.rb | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/oxidized/model/edgeswitch.rb b/lib/oxidized/model/edgeswitch.rb index cb921b8..7c82639 100644 --- a/lib/oxidized/model/edgeswitch.rb +++ b/lib/oxidized/model/edgeswitch.rb @@ -16,9 +16,17 @@ class EdgeSwitch < Oxidized::Model end cfg :telnet, :ssh do - post_login 'enable' - post_login 'terminal length 0' + post_login do + if vars :enable + send "enable\n" + cmd vars(:enable) + else + cmd 'enable' + end + cmd 'terminal length 0' + end pre_logout 'quit' + pre_logout 'n' end end |