#!/usr/bin/perl # # DHCP Reporting, Revision 2.1 # # Copyright (C) 1997-2002 John G. Drummond (omar@omar.org) # http://www.omar.org/opensource/ # # Feel free to email me with comments, criticisms, or questions. # # 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 2 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. # # This program uses Stephen Brenner's cgi-lib.pl, included at the end # of the file for compactness. See the copyright statement preceding # the cgi-lib.pl code. # ################################################################# ###--------------------------OPTIONS--------------------------### # Change to your dhcp file and dhcpd.conf: # (Currently set to ISC DHCP defaults) my $dhcpfile = "/var/lib/dhcp3/dhcpd.leases"; my $dhcpdconf = "/etc/dhcp3/dhcpd.conf"; # change to the relative (web) path to the cgi directory where # reportdhcp.pl is located (usually /cgi-bin): my $CGI = "/cgi-bin"; # change to reflect your system name my $sysname = "Library"; ###----------------------End of Options-----------------------### ################################################################# # MAIN PROGRAM # ReadParse(*values); #contained in cgi-lib.pl, at the bottom. print "Content-type: text/html\n\n"; print "\n
\n"; print "