--- lib/PXElator/dhcpd.pm 2009/07/30 22:44:21 69 +++ lib/PXElator/dhcpd.pm 2009/07/30 23:57:19 72 @@ -126,12 +126,12 @@ my $messagetype = $dhcp->getOptionValue(DHO_DHCP_MESSAGE_TYPE()); if ($messagetype eq DHCPDISCOVER()) { - warn "DHCP DISCOVER"; + log::mac $mac, "DHCP DISCOVER"; $packet->{Comment} = $dhcp->comment(); $packet->{DHO_DHCP_MESSAGE_TYPE()} = DHCPOFFER(); } elsif ($messagetype eq DHCPREQUEST()) { my $requested_ip = $dhcp->getOptionValue(DHO_DHCP_REQUESTED_ADDRESS()); - warn "DHCP REQUEST $requested_ip"; + log::mac $mac, "DHCP REQUEST $requested_ip"; if ( $ip eq $requested_ip ) { $packet->{DHO_DHCP_MESSAGE_TYPE()} = DHCPACK(); $packet->{DHO_DHCP_LEASE_TIME()} = 5 * 60; # 5 min @@ -146,9 +146,9 @@ $packet->{DHO_DHCP_MESSAGE()} = "Bad request, expected $ip"; } } elsif ($messagetype eq DHCPINFORM()) { - warn "DHCP INFORM ignored"; + log::mac $mac, "DHCP INFORM ignored"; } else { - warn "$messagetype igored (bootp?)"; + log::mac $mac, "$messagetype igored (bootp?)"; } warn ">> $mac == $ip server: $server::ip", $pxe::file ? " pxe file: $pxe::file\n" : "\n";