From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Tremer To: development@lists.ipfire.org Subject: Re: [PATCH] ipsec.conf: Include ipsec.user.conf and ipsec.user-post.conf Date: Thu, 04 Jun 2015 17:53:27 +0200 Message-ID: <1433433207.25208.6.camel@ipfire.org> In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============3755710487773549227==" List-Id: --===============3755710487773549227== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Hi, thank you for sending this in. The patch looks good and I merged it already as it is a pretty simple one. 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. Best, -Michael On Thu, 2015-06-04 at 00:58 +0200, Larsen wrote: > 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 > --- > 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 9490076..218dafa 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); --===============3755710487773549227== Content-Type: application/pgp-signature Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="signature.asc" MIME-Version: 1.0 LS0tLS1CRUdJTiBQR1AgU0lHTkFUVVJFLS0tLS0KVmVyc2lvbjogR251UEcgdjIKCmlRSWNCQUFC Q2dBR0JRSlZjSFI0QUFvSkVJQjU4UDl2a0FrSGd0b1AvMUNmQ0xrcnVmTVNFMVg0UmdsOThzSXQK T3FDa1F0YWtadjBZUUJ1QWZiRVRXOEM5VUJIeVpVNTBXYlZ0Tis1bVAzYndVOG9aN2NRTk1UWXp1 L1Z2NE1lMgpQRFNNblR4c2JCYnd1MU1mR2premlHTm5ManVrS2lXM3F2VTkrdGRsNFFGc2h3aUhv NGR6ZXVYWk51OUIxeWR3CjRPSkU0L2w2eGtWSFBycHpsblgvbmVHRUV6Vkx3OXRvUXpTKzRhZWs5 d3lRTmQraWsreVZ5b2FxcGlPRkJzRS8KMGNQM2wyelV5OHNYckt0em5ISnBhSC9yUEE4S0hDYXZM QmJzeEdjZ2dlMEJVdmdtUm1sc3VhL1hMK3ZKK3p2RgppRlpKNVNVSWJCTDVHOFoydThFbnkzbjd5 ZmU3U3ZpRTNMaDEzTHpUbW9CcGJUVVFkNmdpQkhiWVpUWjR1LzZLCml6bTR6bXpzMXpmY2xZTmNl dzZ1VkZtZWlzbVNQeHBhUFFnQXI2MGZLaGh4SkNjaXpTdjNhcVFmOGZJYzI2aTQKdlBESDNIcFJJ WjJ5QWxVNHV2ZGlQeDFDUCtFemdCUzVObmU5TXpzNjR4QUpVMEVmQnkzZzl5ZDloZDdCcXlldAov b05hTHRzSHZnZnY4R1BsaGIzMFVRbitSYnBzM25wRkdJdzJ6OXd0NkNSTEdvS1c1cXBIejRuVFE4 eVA3dFNKCnBLMnhUWFUraUR6Wi9kMVRQbnRNcm13bnpxQ09iL0c2YWxGOXNNY3VhVWQwMnpldkwy ZzdlVjQrNVVCWDJJbVgKU1JWeGNLc2Jpd1pPSmFBY1VrZ1R4QlpDUkRyaWlKMFlsM2lNNnFIbU94 aDZSODNOejhPbktrbjljV0srQWZaVwpxdlIyYTlUMXM1U1BzS0lZZEpXeAo9MXpnVgotLS0tLUVO RCBQR1AgU0lHTkFUVVJFLS0tLS0K --===============3755710487773549227==--