projects
/
pxelator
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a8f98fa
)
fix nr_from_mac which regex change broke into more solid split and hex
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Wed, 21 Jul 2010 18:33:37 +0000
(18:33 +0000)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Wed, 21 Jul 2010 18:33:37 +0000
(18:33 +0000)
lib/PXElator/kvm.pm
patch
|
blob
|
history
diff --git
a/lib/PXElator/kvm.pm
b/lib/PXElator/kvm.pm
index
5cbc0bc
..
2582581
100644
(file)
--- a/
lib/PXElator/kvm.pm
+++ b/
lib/PXElator/kvm.pm
@@
-99,8
+99,9
@@
sub start {
sub nr_from_mac {
my $mac = shift;
- $mac =~ s<^.+:([0-9a-f]{2})$><hex($1)>e;
- $mac;
+ my $nr = (split(/:/,$mac,6))[-1];
+ $nr = hex($nr);
+ return $nr;
}
sub next_nr {