/[pxelator]/lib/PXElator/dhcpd.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /lib/PXElator/dhcpd.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 312 by dpavlin, Wed Aug 19 17:01:20 2009 UTC revision 313 by dpavlin, Thu Aug 27 18:59:12 2009 UTC
# Line 105  sub process_packet { Line 105  sub process_packet {
105    
106          $dhcp->comment( $transaction++ );          $dhcp->comment( $transaction++ );
107    
108          my $mac = substr($dhcp->chaddr(),0,$dhcp->hlen()*2);          my $mac = format::mac( substr($dhcp->chaddr(),0,$dhcp->hlen()*2) );
109          my $ip = client_mac_ip($mac, $dhcp->ciaddr);          my $ip = client_mac_ip($mac, $dhcp->ciaddr);
110    
111          my $hostname = $dhcp->getOptionValue(DHO_HOST_NAME);          my $hostname = $dhcp->getOptionValue(DHO_HOST_NAME);
112          print "$ip ", client::conf( $ip => 'hostname', default => $hostname ), " >> /etc/hosts\n";          print "$ip ", client::conf( $ip => 'hostname', default => $hostname ), " >> /etc/hosts\n" if $hostname;
113    
114          my $audit = { mac => format::mac($mac), ip => $ip, hostname => $hostname,          my $audit = { mac => $mac, ip => $ip, hostname => $hostname,
115                  options => {                  options => {
116                          map {                          map {
117                                  ( $_ => $dhcp->getOptionValue( $_ ) )                                  ( $_ => $dhcp->getOptionValue( $_ ) )

Legend:
Removed from v.312  
changed lines
  Added in v.313

  ViewVC Help
Powered by ViewVC 1.1.26