--- lib/PXElator/dhcpd.pm 2009/08/27 18:57:46 312 +++ lib/PXElator/dhcpd.pm 2009/08/27 18:59:12 313 @@ -105,13 +105,13 @@ $dhcp->comment( $transaction++ ); - my $mac = substr($dhcp->chaddr(),0,$dhcp->hlen()*2); + my $mac = format::mac( substr($dhcp->chaddr(),0,$dhcp->hlen()*2) ); my $ip = client_mac_ip($mac, $dhcp->ciaddr); my $hostname = $dhcp->getOptionValue(DHO_HOST_NAME); - print "$ip ", client::conf( $ip => 'hostname', default => $hostname ), " >> /etc/hosts\n"; + print "$ip ", client::conf( $ip => 'hostname', default => $hostname ), " >> /etc/hosts\n" if $hostname; - my $audit = { mac => format::mac($mac), ip => $ip, hostname => $hostname, + my $audit = { mac => $mac, ip => $ip, hostname => $hostname, options => { map { ( $_ => $dhcp->getOptionValue( $_ ) )