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

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

revision 404 by dpavlin, Mon Sep 7 21:34:05 2009 UTC revision 405 by dpavlin, Tue Sep 8 21:06:40 2009 UTC
# Line 85  sub start { Line 85  sub start {
85    
86  }  }
87    
88    sub nr_from_mac {
89            my $mac = shift;
90            $mac =~ s{^.+:([0-9a-f]{2})$}{hex($1)}e;
91            $mac;
92    }
93    
94    sub next_nr {
95            my @kvms = glob "$server::conf/mac/AC:DE:48:00:00:*";
96            my $nr = nr_from_mac( pop @kvms );
97            return $nr + 1;
98    }
99    
100  warn 'loaded';  warn 'loaded';
101    
102  1;  1;

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

  ViewVC Help
Powered by ViewVC 1.1.26