summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authornetwork-guy <mike@mgww.net>2016-07-07 18:07:50 -0500
committerGitHub <noreply@github.com>2016-07-07 18:07:50 -0500
commite2eb00ca52138053f3b076b34dd6bb75d23ed638 (patch)
tree7bd7bd23c113603479480368b1101d2ba7a3e264 /lib
parenta78fb82df868f053b9e12b22e35c60b769838475 (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.
Diffstat (limited to 'lib')
-rw-r--r--lib/oxidized/model/fortios.rb2
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 ' '