/[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 194 by dpavlin, Mon Aug 10 17:30:01 2009 UTC revision 200 by dpavlin, Tue Aug 11 15:55:26 2009 UTC
# Line 48  sub client_ip { Line 48  sub client_ip {
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( $mac );
52                  print "NEW $mac $ip\n";                  print "NEW $mac $ip\n";
                 symlink "$conf/ip/$ip", "$conf/mac/$mac";  
53          }          }
54    
         my $ip_path = "$conf/ip/$ip";  
         mkdir $ip_path unless -e $ip_path;  
   
         if ( -l "$ip_path/mac" && readlink "$ip_path/mac" ne "$conf/mac/$mac" ) {  
                 warn "$mac IP changed from ", readlink "$ip_path/mac", " to $ip";  
                 unlink "$ip_path/mac";  
         };  
   
         symlink "$conf/mac/$mac", "$ip_path/mac";  
   
55          return $ip;          return $ip;
56  }  }
57    

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

  ViewVC Help
Powered by ViewVC 1.1.26