X-Git-Url: http://git.ipfire.org/?p=people%2Fpmueller%2Fipfire-2.x.git;a=blobdiff_plain;f=html%2Fcgi-bin%2Fdhcp.cgi;h=cde6065f57553dfd8c8d1098112dfa349a420c45;hp=9357bff17ed418d0525b0e98e4203bb82b4b4b94;hb=55b2f2eb09419c3c7b2bffd2c4e8141e3a37a9de;hpb=cb5e9c6c64d5281eba5c790f14c2e5f3066becbf diff --git a/html/cgi-bin/dhcp.cgi b/html/cgi-bin/dhcp.cgi index 9357bff17e..cde6065f57 100644 --- a/html/cgi-bin/dhcp.cgi +++ b/html/cgi-bin/dhcp.cgi @@ -1,24 +1,24 @@ #!/usr/bin/perl -# -# SmoothWall CGIs -# -# This code is distributed under the terms of the GPL -# -# (c) The SmoothWall Team -# -# Copyright (C) 01-02-2002 Graham Smith -# - Fixed DHCP Leases added -# -# $Id: dhcp.cgi,v 1.14.2.81 2006/01/20 12:05:29 franck78 Exp $ -# -# Franck -rewrite for two or more interface -# nov/2004 -check range is in correct subnet -# -add NTP option -# -add display sorting of actives leases -# dec/2004 -add comment field to fixed leases -# -# to do : choose a correct format for displaying dates -# +############################################################################### +# # +# IPFire.org - A linux based firewall # +# Copyright (C) 2007 Michael Tremer & Christian Schmidt # +# # +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program. If not, see . # +# # +############################################################################### + use strict; # enable only the following on debugging purpose @@ -544,9 +544,9 @@ print < $Lang::tr{'ip address'}
$Lang::tr{'netmask'}:$netsettings{"${itf}_ADDRESS"}
$netsettings{"${itf}_NETMASK"}
- $Lang::tr{'start address'} * + $Lang::tr{'start address'} - $Lang::tr{'end address'} * + $Lang::tr{'end address'} $Lang::tr{'default lease time'} @@ -1014,33 +1014,6 @@ END &Header::closebox(); -&Header::openbox('100%', 'left', $Lang::tr{'arp table entries'}); -my @ip = qx(/sbin/ip neigh show | awk '{print \$1}'); -my @mac = qx(/sbin/ip neigh show | awk '{print \$5}'); - -print < - - - - -END -; -my $i=0; - -foreach my $ip(@ip) -{ - print""; - print""; - print""; -} - - -print"
$Lang::tr{'ip address'}$Lang::tr{'mac address'}Optionen
$ip@mac[$i]
"; - -&Header::closebox(); - - foreach my $itf (@ITFs) { if ($dhcpsettings{"ENABLE_${itf}"} eq 'on') { # display leases with a list of actions to do with the global select checkbox. @@ -1226,6 +1199,7 @@ sub buildconf { $key++; } } + print FILE "include \"${General::swroot}/dhcp/dhcpd.conf.local\";\n"; close FILE; if ( $dhcpsettings{"ENABLE_GREEN"} eq 'on' || $dhcpsettings{"ENABLE_BLUE"} eq 'on' ) {system '/usr/local/bin/dhcpctrl enable >/dev/null 2>&1';} else {system '/usr/local/bin/dhcpctrl disable >/dev/null 2>&1';}