/[pxelator]/lib/PXElator/client.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/client.pm

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

revision 395 by dpavlin, Tue Sep 8 17:28:28 2009 UTC revision 403 by dpavlin, Tue Sep 8 20:38:26 2009 UTC
# Line 84  sub next_ip($) { Line 84  sub next_ip($) {
84          my $mac = shift;          my $mac = shift;
85          $mac = format::mac($mac);          $mac = format::mac($mac);
86    
87          if ( my $clients_left = server::shared( 'new_clients' ) ) {          if ( $server::new_clients-- ) {
88                  server::shared( 'new_clients', $clients_left - 1 );                  warn "# clients left: $server::new_clients\n";
89          } else {          } else {
90                  warn "W: no new clients accepted";                  warn "W: no new clients accepted";
91                  return '0.0.0.0';                  return '0.0.0.0';
# Line 194  sub arp_mac_dev { Line 194  sub arp_mac_dev {
194          return $arp;          return $arp;
195  }  }
196    
197    sub rebuild_mac_links {
198            warn "# rebuild mac links";
199            foreach my $ip ( all_ips ) {
200                    my $mac = ip_path $ip, 'mac';
201                    if ( -e $mac ) {
202                            $mac = read_file $mac;
203                            save_ip_mac( $ip, $mac );
204                            warn "## $ip $mac\n";
205                    }
206            }
207    }
208    
209  1;  1;

Legend:
Removed from v.395  
changed lines
  Added in v.403

  ViewVC Help
Powered by ViewVC 1.1.26