Improve indentation and HTML output of PrintActualLeases & leasesort

Signed-off-by: Leo-Andres Hofmann <hofmann@leo-andres.de>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
Leo-Andres Hofmann
2020-10-21 12:48:30 +01:00
committed by Michael Tremer
parent 449b1aeea7
commit 934a376918

View File

@@ -403,13 +403,13 @@ sub PrintActualLeases
<th width='25%' align='center'><a href='$ENV{'SCRIPT_NAME'}?ETHER'><b>$tr{'mac address'}</b></a></th>
<th width='20%' align='center'><a href='$ENV{'SCRIPT_NAME'}?HOSTNAME'><b>$tr{'hostname'}</b></a></th>
<th width='25%' align='center'><a href='$ENV{'SCRIPT_NAME'}?ENDTIME'><b>$tr{'lease expires'} (local time d/m/y)</b></a></th>
<th width='5%' align='center'><b>Add to fix leases<b></th>
<th width='5%' align='center'><b>Add to fix leases</b></th>
</tr>
END
;
open(LEASES,"/var/state/dhcp/dhcpd.leases") or die "Can't open dhcpd.leases";
while ($line = <LEASES>) {
while (my $line = <LEASES>) {
next if( $line =~ /^\s*#/ );
chomp($line);
@temp = split (' ', $line);
@@ -456,8 +456,7 @@ END
if ($id % 2) {
print "<tr>";
$col="bgcolor='$table1colour'";
}
else {
} else {
print "<tr>";
$col="bgcolor='$table2colour'";
}