]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
ipsec.conf: Include ipsec.user.conf and ipsec.user-post.conf
authorLars Schuhmacher <larsen007@web.de>
Wed, 3 Jun 2015 22:58:49 +0000 (00:58 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 4 Jun 2015 15:50:51 +0000 (17:50 +0200)
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 <larsen007@web.de>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
html/cgi-bin/vpnmain.cgi

index 94900765f523107efed7327e88e0491c87716436..218dafa26814624dd2e3358cf661c3e7566a8087 100644 (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);