From bd767b27c85b2c6992cac38781b7bb78a03b694a Mon Sep 17 00:00:00 2001 From: Lars Schuhmacher Date: Thu, 4 Jun 2015 00:58:49 +0200 Subject: [PATCH] ipsec.conf: Include ipsec.user.conf and ipsec.user-post.conf Fix bug 10869 as the code has been removed by mistake by the previous commit dfea4f86c22c83e07d0f4a6f2a02166229ecb120. It also includes ipsec.user.conf only when it exists. Signed-off-by: Lars Schuhmacher Signed-off-by: Michael Tremer --- html/cgi-bin/vpnmain.cgi | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/html/cgi-bin/vpnmain.cgi b/html/cgi-bin/vpnmain.cgi index 94900765f5..218dafa268 100644 --- a/html/cgi-bin/vpnmain.cgi +++ b/html/cgi-bin/vpnmain.cgi @@ -253,8 +253,10 @@ sub writeipsecfiles { print CONF "\n"; # Add user includes to config file - print CONF "include /etc/ipsec.user.conf\n"; - print CONF "\n"; + if (-e "/etc/ipsec.user.conf") { + print CONF "include /etc/ipsec.user.conf\n"; + print CONF "\n"; + } print SECRETS "include /etc/ipsec.user.secrets\n"; @@ -407,6 +409,14 @@ sub writeipsecfiles { print CONF "\n"; }#foreach key + + # Add post user includes to config file + # After the GUI-connections allows to patch connections. + if (-e "/etc/ipsec.user-post.conf") { + print CONF "include /etc/ipsec.user-post.conf\n"; + print CONF "\n"; + } + print SECRETS $last_secrets if ($last_secrets); close(CONF); close(SECRETS); -- 2.39.5