[PATCH] dhcp.cgi: Fix for bug #12050

Michael Tremer michael.tremer at ipfire.org
Wed Jun 5 10:05:09 BST 2019


Hello,

I merged this patch.

I had to spend a little time to figure out what you actually wanted to achieve here. It would have helped to add to the commit message that the expected behaviour just wasn’t programmed into the file and that this patch now changes that.

I updated the commit message for your future reference. Please read through that and take some inspiration from that with your next patch.

I am happy that we can finally close this bug.

Best,
-Michael

> On 4 Jun 2019, at 11:24, Bernhard Bitsch <Bernhard.Bitsch at gmx.de> wrote:
> 
> Save fixed leases to file after addition of a new lease
> 
> Signed-off-by: Bernhard Bitsch <bbitsch at ipfire.org>
> 
> ---
> html/cgi-bin/dhcp.cgi | 3 +++
> 1 file changed, 3 insertions(+)
> 
> 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'} = &Header::cleanhtml($dhcpsettings{'FIX_ROOTPATH'});
> 	if ($dhcpsettings{'KEY2'} eq '') { #add or edit ?
> 	    unshift (@current2, "$dhcpsettings{'FIX_MAC'},$dhcpsettings{'FIX_ADDR'},$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'});
> 
> 	    # Enter edit mode
> --
> 2.21.0.windows.1
> 



More information about the Development mailing list