From e2eb00ca52138053f3b076b34dd6bb75d23ed638 Mon Sep 17 00:00:00 2001 From: network-guy Date: Thu, 7 Jul 2016 18:07:50 -0500 Subject: Issue identifying prompt with truncated hostname The FortiOS device will truncate the hostname if it exceeds 24 characters. It will place a tilde (~) in the hostname, either at the end or before a hyphen. This causes a failure with prompt recognition and causes the backup to fail. This change adds a tilde as an identifying character in the prompt. --- lib/oxidized/model/fortios.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/oxidized') diff --git a/lib/oxidized/model/fortios.rb b/lib/oxidized/model/fortios.rb index aad3a6e..cd379b7 100644 --- a/lib/oxidized/model/fortios.rb +++ b/lib/oxidized/model/fortios.rb @@ -2,7 +2,7 @@ class FortiOS < Oxidized::Model comment '# ' - prompt /^([-\w\.]+(\s[\(\w\-\.\)]+)?\~?\s?[#>$]\s?)$/ + prompt /^([-\w\.\~]+(\s[\(\w\-\.\)]+)?\~?\s?[#>$]\s?)$/ expect /^--More--\s$/ do |data, re| send ' ' -- cgit v1.2.1