/[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 177 by dpavlin, Fri Aug 7 14:08:21 2009 UTC revision 194 by dpavlin, Mon Aug 10 17:30:01 2009 UTC
# Line 44  sub client_ip { Line 44  sub client_ip {
44    
45          my $ip;          my $ip;
46    
47          if ( -e "$conf/mac/$mac" ) {          if ( $ip = client::ip_from_mac( $mac ) ) {
                 $ip = read_file "$conf/mac/$mac";  
48                  print "RENEW $mac $ip\n";                  print "RENEW $mac $ip\n";
49                  return $ip;                  return $ip;
50          } else {          } else {
51                  $ip = client::next_ip;                  $ip = client::next_ip;
52                  print "NEW $mac $ip\n";                  print "NEW $mac $ip\n";
53                  write_file "$conf/mac/$mac", $ip;                  symlink "$conf/ip/$ip", "$conf/mac/$mac";
54          }          }
55    
56          my $ip_path = "$conf/ip/$ip";          my $ip_path = "$conf/ip/$ip";

Legend:
Removed from v.177  
changed lines
  Added in v.194

  ViewVC Help
Powered by ViewVC 1.1.26