summaryrefslogtreecommitdiff
path: root/lib/oxidized/model/xos.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/oxidized/model/xos.rb')
-rw-r--r--lib/oxidized/model/xos.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/oxidized/model/xos.rb b/lib/oxidized/model/xos.rb
index 88c81ed..de8ec39 100644
--- a/lib/oxidized/model/xos.rb
+++ b/lib/oxidized/model/xos.rb
@@ -6,7 +6,9 @@ class XOS < Oxidized::Model
comment '# '
cmd :all do |cfg|
- cfg.each_line.to_a[1..-2].join.rstrip
+ # xos inserts leading \r characters and other trailing white space.
+ # this deletes extraneous \r and trailing white space.
+ cfg.each_line.to_a[1..-2].map{|line|line.delete("\r").rstrip}.join("\n") + "\n"
end
cmd 'show version' do |cfg|
@@ -35,6 +37,7 @@ class XOS < Oxidized::Model
cfg :telnet, :ssh do
post_login 'disable clipaging'
pre_logout 'exit'
+ pre_logout 'n'
end
end