FortiOS.pm: older versions (<= 6.4.7) apparently require leaving config global mode entering before config vdom

This commit is contained in:
Christian Ramseyer
2023-11-06 23:54:09 +01:00
parent faea72827c
commit 0c4d812496

View File

@@ -159,6 +159,9 @@ sub arpnip {
push(@$vdoms, $1) if $_ && (/^==\s*\[\s*(\S+)\s*\]$/); push(@$vdoms, $1) if $_ && (/^==\s*\[\s*(\S+)\s*\]$/);
} }
$expect->send("end\n");
$expect->expect($timeout, -re, $prompt);
foreach (@$vdoms) { foreach (@$vdoms) {
$expect->send("config vdom\n"); $expect->send("config vdom\n");
$expect->expect($timeout, -re, $prompt); $expect->expect($timeout, -re, $prompt);