diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/oxidized/model/cumulus.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/oxidized/model/cumulus.rb b/lib/oxidized/model/cumulus.rb index c8e1707..f6f5df4 100644 --- a/lib/oxidized/model/cumulus.rb +++ b/lib/oxidized/model/cumulus.rb @@ -88,6 +88,19 @@ class Cumulus < Oxidized::Model end cfg :telnet, :ssh do + post_login do + if vars(:enable) == true then + cmd "sudo su -", /^\[sudo] password/ + cmd vars(:password) + elsif vars(:enable) + cmd "su -", /^Password:/ + cmd vars(:enable) + end + end + + pre_logout do + cmd "exit" if vars(:enable) + end pre_logout 'exit' end end |