diff options
Diffstat (limited to 'lib/oxidized/model/screenos.rb')
-rw-r--r-- | lib/oxidized/model/screenos.rb | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/oxidized/model/screenos.rb b/lib/oxidized/model/screenos.rb index 922f401..7ee9d9f 100644 --- a/lib/oxidized/model/screenos.rb +++ b/lib/oxidized/model/screenos.rb @@ -4,7 +4,7 @@ class ScreenOS < Oxidized::Model comment '! ' - prompt '/^([\w.-\(\)]+->\s?)$/' + prompt /^[\w.:\(\)-]+->\s?$/ cmd :all do |cfg| cfg.each_line.to_a[2..-2].join @@ -18,6 +18,8 @@ class ScreenOS < Oxidized::Model end cmd 'get system' do |cfg| + cfg.gsub! /^Date\ .*\n/, '' + cfg.gsub! /^Up\ .*\n/, '' comment cfg end @@ -33,7 +35,10 @@ class ScreenOS < Oxidized::Model cfg :telnet, :ssh do post_login 'set console page 0' - pre_logout 'exit' + pre_logout do + send "exit\n" + send "n" + end end end |