From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Tremer To: development@lists.ipfire.org Subject: Re: [PATCH] dhcp.cgi: Fix for bug #12050 Date: Wed, 05 Jun 2019 13:06:13 +0100 Message-ID: In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============4931205463155617165==" List-Id: --===============4931205463155617165== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hi, > On 5 Jun 2019, at 12:13, Bernhard Bitsch wrote: >=20 > Hello, >=20 > Thanks for the merge. >=20 >> Gesendet: Mittwoch, 05. Juni 2019 um 11:05 Uhr >> Von: "Michael Tremer" >> An: "Bernhard Bitsch" >> Cc: "IPFire Development" >> Betreff: Re: [PATCH] dhcp.cgi: Fix for bug #12050 >>=20 >> Hello, >>=20 >> I merged this patch. >>=20 >> I had to spend a little time to figure out what you actually wanted to ach= ieve here. It would have helped to add to the commit message that the expecte= d behaviour just wasn=E2=80=99t programmed into the file and that this patch = now changes that. >>=20 >=20 > The commit message just describes what has changed. The new entry is just a= dded to the file. > It is not the "one-click-solution" I would prefer, too. > I can submit a patch for this functionality, if we want to do it this way. I tested the patch and I could add an extra from the fixed list with one clic= k. What are you referring to? >=20 >> I updated the commit message for your future reference. Please read throug= h that and take some inspiration from that with your next patch. >>=20 > I've read your message. If the patch contained this functionality I would h= ave stated that in this way. What does the patch do from your point of view? >=20 >> I am happy that we can finally close this bug. >>=20 > So am I. >=20 > Best, > Bernhard >=20 >> Best, >> -Michael >>=20 >>> On 4 Jun 2019, at 11:24, Bernhard Bitsch wrote: >>>=20 >>> Save fixed leases to file after addition of a new lease >>>=20 >>> Signed-off-by: Bernhard Bitsch >>>=20 >>> --- >>> html/cgi-bin/dhcp.cgi | 3 +++ >>> 1 file changed, 3 insertions(+) >>>=20 >>> diff --git a/html/cgi-bin/dhcp.cgi b/html/cgi-bin/dhcp.cgi >>> index 675d80012..19c55eb6d 100644 >>> --- a/html/cgi-bin/dhcp.cgi >>> +++ b/html/cgi-bin/dhcp.cgi >>> @@ -443,6 +443,9 @@ if ($dhcpsettings{'ACTION'} eq $Lang::tr{'add'}.'2') { >>> $dhcpsettings{'FIX_ROOTPATH'} =3D &Header::cleanhtml($dhcpsettings{'FIX_= ROOTPATH'}); >>> if ($dhcpsettings{'KEY2'} eq '') { #add or edit ? >>> unshift (@current2, "$dhcpsettings{'FIX_MAC'},$dhcpsettings{'FIX_ADD= R'},$dhcpsettings{'FIX_ENABLED'},$dhcpsettings{'FIX_NEXTADDR'},$dhcpsettings{= 'FIX_FILENAME'},$dhcpsettings{'FIX_ROOTPATH'},$dhcpsettings{'FIX_REMARK'}\n"); >>> + open(FILE, ">$filename2") or die 'Unable to open fixed lease file.'; >>> + print FILE @current2; >>> + close(FILE); >>> &General::log($Lang::tr{'fixed ip lease added'}); >>>=20 >>> # Enter edit mode >>> -- >>> 2.21.0.windows.1 >>>=20 >>=20 >>=20 --===============4931205463155617165==--