From 348dd2e978159f35d374a8a3bcb96c14cf77aaae Mon Sep 17 00:00:00 2001 From: Nick Hilliard Date: Sun, 11 Oct 2015 23:36:59 +0100 Subject: sometimes the comware prompt might have a leading nul char --- lib/oxidized/model/comware.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/oxidized') diff --git a/lib/oxidized/model/comware.rb b/lib/oxidized/model/comware.rb index aa98ccb..dcab14e 100644 --- a/lib/oxidized/model/comware.rb +++ b/lib/oxidized/model/comware.rb @@ -1,7 +1,8 @@ class Comware < Oxidized::Model # HP (A-series)/H3C/3Com Comware - prompt /^(<[\w.-]+>)$/ + # sometimes the prompt might have a leading nul + prompt /^(\0)*(<[\w.-]+>)$/ comment '# ' # example how to handle pager -- cgit v1.2.1 From 4311ac0841a82997707ae469d6a46363ddb06ca1 Mon Sep 17 00:00:00 2001 From: Nick Hilliard Date: Sun, 11 Oct 2015 23:46:56 +0100 Subject: remove () from nul byte check in comware prompt --- lib/oxidized/model/comware.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/oxidized') diff --git a/lib/oxidized/model/comware.rb b/lib/oxidized/model/comware.rb index dcab14e..9b36e8b 100644 --- a/lib/oxidized/model/comware.rb +++ b/lib/oxidized/model/comware.rb @@ -2,7 +2,7 @@ class Comware < Oxidized::Model # HP (A-series)/H3C/3Com Comware # sometimes the prompt might have a leading nul - prompt /^(\0)*(<[\w.-]+>)$/ + prompt /^\0*(<[\w.-]+>)$/ comment '# ' # example how to handle pager -- cgit v1.2.1