public inbox for development@lists.ipfire.org
 help / color / mirror / Atom feed
From: Michael Tremer <michael.tremer@ipfire.org>
To: development@lists.ipfire.org
Subject: Re: [PATCH] ipsec.conf: Include ipsec.user.conf and ipsec.user-post.conf
Date: Thu, 04 Jun 2015 18:02:24 +0200	[thread overview]
Message-ID: <1433433744.25208.13.camel@ipfire.org> (raw)
In-Reply-To: <op.xzpqo4lecahio0@atl-uetersen.atlantisgmbh.local>

[-- Attachment #1: Type: text/plain, Size: 778 bytes --]

On Thu, 2015-06-04 at 17:59 +0200, Larsen wrote:
> On Thu, 04 Jun 2015 17:53:27 +0200, Michael Tremer  
> <michael.tremer(a)ipfire.org> wrote:
> 
> > thank you for sending this in. The patch looks good and I merged it
> > already as it is a pretty simple one.
> 
> thx!
> 
> 
> > However I had again trouble applying it right away. I do not really know
> > why. It must some sort of whitespace error because the patch applies
> > with patch --ignore-whitespace. So this wasn't a one-time error with the
> > last patch.
> 
> For testing purposes, could you please create a patch file from what you  
> have just merged so I can compare your patch with the file that  
> Tortoisegit created for me?

Sure. You will find that attached for your convenience.

> 
> 
> Lars

-Michael

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: ipsec.conf.patch --]
[-- Type: text/x-patch, Size: 1461 bytes --]

commit bd767b27c85b2c6992cac38781b7bb78a03b694a
Author: Lars Schuhmacher <larsen007@web.de>
Date:   Thu Jun 4 00:58:49 2015 +0200

    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 <larsen007@web.de>
    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

diff --git a/html/cgi-bin/vpnmain.cgi b/html/cgi-bin/vpnmain.cgi
index 94900765f523..218dafa26814 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);

[-- Attachment #3: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

      reply	other threads:[~2015-06-04 16:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-03 22:58 Larsen
2015-06-04 15:53 ` Michael Tremer
2015-06-04 15:59   ` Larsen
2015-06-04 16:02     ` Michael Tremer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1433433744.25208.13.camel@ipfire.org \
    --to=michael.tremer@ipfire.org \
    --cc=development@lists.ipfire.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox