diff options
author | Jeff Leung <jleung@v10networks.ca> | 2015-02-05 06:26:36 +0000 |
---|---|---|
committer | Jeff Leung <jleung@v10networks.ca> | 2015-02-05 06:31:05 +0000 |
commit | a64d08fe6cfbc6275c2682fbe92d4856334deec2 (patch) | |
tree | 15ac006b7fcb7d4d3951bcd86e59e14d1ba605ae /scripts/vpn-config.pl | |
parent | de318d8d25427a27c80206c16dc36c0021dfca2c (diff) | |
download | vyatta-cfg-vpn-a64d08fe6cfbc6275c2682fbe92d4856334deec2.tar.gz vyatta-cfg-vpn-a64d08fe6cfbc6275c2682fbe92d4856334deec2.zip |
Allow users to specify a custom file to be included with ipsec.conf
Diffstat (limited to 'scripts/vpn-config.pl')
-rwxr-xr-x | scripts/vpn-config.pl | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/scripts/vpn-config.pl b/scripts/vpn-config.pl index b974a5a..7dd18f1 100755 --- a/scripts/vpn-config.pl +++ b/scripts/vpn-config.pl @@ -1160,6 +1160,16 @@ if ($vcVPN->exists('ipsec')) { } } } + + # + # Include a custom configuration file + # + my $custom_include = $vcVPN->returnValue("ipsec include-ipsec-conf"); + if (defined($custom_include)) { + if ( ! -e $custom_include ) { + vpn_die(["vpn","ipsec","include-ipsec-conf"],"$vpn_cfg_err The specified file for inclusion inside ipsec.conf does not exist."); + } + } if (-e '/etc/dmvpn.conf') { $genout .= "\ninclude /etc/dmvpn.conf\n"; } |