diff options
author | network-guy <mike@mgww.net> | 2016-07-07 18:07:50 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-07 18:07:50 -0500 |
commit | e2eb00ca52138053f3b076b34dd6bb75d23ed638 (patch) | |
tree | 7bd7bd23c113603479480368b1101d2ba7a3e264 | |
parent | a78fb82df868f053b9e12b22e35c60b769838475 (diff) |
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.
-rw-r--r-- | lib/oxidized/model/fortios.rb | 2 |
1 files changed, 1 insertions, 1 deletions
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 ' ' |