/[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 32 by dpavlin, Wed Jul 29 00:59:55 2009 UTC revision 33 by dpavlin, Wed Jul 29 12:23:47 2009 UTC
# Line 69  sub client_ip { Line 69  sub client_ip {
69          }          }
70    
71          write_file "$conf/mac/$mac", $ip;          write_file "$conf/mac/$mac", $ip;
72          unlink     "$conf/ip/$ip" if -e "$conf/ip/$ip";          if ( -l "$conf/ip/$ip" && readlink "$conf/ip/$ip" ne "$conf/mac/$mac") {
73          symlink    "$conf/mac/$mac", "$conf/ip/$ip";                  unlink     "$conf/ip/$ip";
74                    symlink    "$conf/mac/$mac", "$conf/ip/$ip";
75                    warn "$mac IP changed to $ip";
76            }
77    
78          print "$mac NEW $ip\n";          print "$mac NEW $ip\n";
79    

Legend:
Removed from v.32  
changed lines
  Added in v.33

  ViewVC Help
Powered by ViewVC 1.1.26