/[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 405 by dpavlin, Tue Sep 8 20:38:26 2009 UTC revision 406 by dpavlin, Wed Sep 9 09:04:04 2009 UTC
# Line 12  use server; Line 12  use server;
12  use format;  use format;
13  use ip;  use ip;
14  use ping;  use ping;
15    use kvm;
16    
17  our $debug = $server::debug;  our $debug = $server::debug;
18    
# Line 165  sub all_ips { Line 166  sub all_ips {
166          map {          map {
167                  my $ip = $_;                  my $ip = $_;
168                  $ip =~ s{^.+/ip/}{};                  $ip =~ s{^.+/ip/}{};
169                    autocreate_params( $ip );
170                  $ip;                  $ip;
171          } glob("$server::conf/ip/*")          } glob("$server::conf/ip/*")
172  }  }
# Line 206  sub rebuild_mac_links { Line 208  sub rebuild_mac_links {
208          }          }
209  }  }
210    
211    sub autocreate_params {
212            my $ip = shift;
213            my $mac = mac_from_ip $ip;
214            if ( $mac =~ m{^AC:DE:48:00:00} && ! defined conf( $ip, 'kvm' ) ) {
215                    conf( $ip, 'kvm', default => kvm::nr_from_mac( $mac ) );
216                    warn "# create kvm for $ip";
217            }
218    }
219    
220  1;  1;

Legend:
Removed from v.405  
changed lines
  Added in v.406

  ViewVC Help
Powered by ViewVC 1.1.26