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 | |
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
-rwxr-xr-x | scripts/vpn-config.pl | 10 | ||||
-rw-r--r-- | templates/vpn/ipsec/include-ipsec-conf/node.def | 2 |
2 files changed, 12 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"; } diff --git a/templates/vpn/ipsec/include-ipsec-conf/node.def b/templates/vpn/ipsec/include-ipsec-conf/node.def new file mode 100644 index 0000000..fc82a45 --- /dev/null +++ b/templates/vpn/ipsec/include-ipsec-conf/node.def @@ -0,0 +1,2 @@ +type: txt +help: Sets to include an additional configuration directive file for strongSwan. Use an absolute path to specify the included file. |