]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blobdiff - html/cgi-bin/dhcp.cgi
perl-scripts: suppress smartmatch experimental warning
[people/pmueller/ipfire-2.x.git] / html / cgi-bin / dhcp.cgi
index 675d8001200aa37eb8bfda4c2187f65b51b4cf49..cefcf82ff41041be982fa91b430d78da40aea9e1 100644 (file)
@@ -20,6 +20,7 @@
 ###############################################################################
 
 use strict;
+use ecperimental 'smartmatch';
 
 # enable only the following on debugging purpose
 #use warnings;
@@ -443,6 +444,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