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 dfea4f86c2.
It also includes ipsec.user.conf only when it exists.

Signed-off-by: Lars Schuhmacher <larsen007@web.de>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
Lars Schuhmacher
2015-06-04 00:58:49 +02:00
committed by Michael Tremer
parent e528fb2c73
commit bd767b27c8

View File

@@ -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);