projects
/
mirror
/
dsa-puppet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update stdlib
[mirror/dsa-puppet.git]
/
3rdparty
/
modules
/
stdlib
/
lib
/
puppet
/
parser
/
functions
/
is_mac_address.rb
diff --git
a/3rdparty/modules/stdlib/lib/puppet/parser/functions/is_mac_address.rb
b/3rdparty/modules/stdlib/lib/puppet/parser/functions/is_mac_address.rb
index
1b3088a
..
5993ed2
100644
(file)
--- a/
3rdparty/modules/stdlib/lib/puppet/parser/functions/is_mac_address.rb
+++ b/
3rdparty/modules/stdlib/lib/puppet/parser/functions/is_mac_address.rb
@@
-9,13
+9,12
@@
Returns true if the string passed to this function is a valid mac address.
) do |arguments|
if (arguments.size != 1) then
) do |arguments|
if (arguments.size != 1) then
- raise(Puppet::ParseError, "is_mac_address(): Wrong number of arguments "+
- "given #{arguments.size} for 1")
+ raise(Puppet::ParseError, "is_mac_address(): Wrong number of arguments given #{arguments.size} for 1")
end
mac = arguments[0]
end
mac = arguments[0]
- if /^[a-f
A-F0-9]{1,2}:[a-fA-F0-9]{1,2}:[a-fA-F0-9]{1,2}:[a-fA-F0-9]{1,2}:[a-fA-F0-9]{1,2}:[a-fA-F0-9]{1,2}$/
.match(mac) then
+ if /^[a-f
0-9]{1,2}(:[a-f0-9]{1,2}){5}$/i
.match(mac) then
return true
else
return false
return true
else
return false