summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xscripts/dmvpn-config.pl7
1 files changed, 6 insertions, 1 deletions
diff --git a/scripts/dmvpn-config.pl b/scripts/dmvpn-config.pl
index 63f1854..475c217 100755
--- a/scripts/dmvpn-config.pl
+++ b/scripts/dmvpn-config.pl
@@ -36,9 +36,9 @@ my $LOGFILE = '/var/log/vyatta/ipsec.log';
my $vpn_cfg_err = "VPN configuration error:";
my $genout;
my $dh_disable;
+my my $conf_header = 0;
$genout .= "# generated by $0\n\n";
-$genout .= "connections {\n";
#
# Prepare Vyatta::Config object
@@ -167,6 +167,11 @@ if ( $vcVPN->exists('ipsec') ) {
my $needs_passthrough = 'false';
my $tunKeyword = 'tunnel ' . "$tunnel";
+ if ( $conf_header eq 0 ) {
+ $genout .= "connections {\n";
+ $conf_header = 1;
+ }
+
my $conn_head = "\tdmvpn-$profile-$tunnel {\n";
$genout .= $conn_head;