[Pkg-puppet-devel] [SCM] Packaging of Facter for debian branch, upstream, updated. 51bcebe38cab6088c901f1006339bbe40a36d161
James Turnbull
james at lovedthanlost.net
Wed Aug 18 05:55:46 UTC 2010
The following commit has been merged in the upstream branch:
commit e19024bbef18a4a2053537415bfe16bfaff00b8a
Author: James Turnbull <james at lovedthanlost.net>
Date: Sat Apr 24 15:54:09 2010 +1000
Fixed #2938 - interfaces that don't match ^\w+[.:]?\d+ are ignored
Thanks to Tim Sharpe for the fix
diff --git a/lib/facter/util/ip.rb b/lib/facter/util/ip.rb
index 5941d38..25acf3a 100644
--- a/lib/facter/util/ip.rb
+++ b/lib/facter/util/ip.rb
@@ -24,7 +24,7 @@ module Facter::Util::IP
# Convert an interface name into purely alpha characters.
def self.alphafy(interface)
- interface.gsub(/[:.]/, '_')
+ interface.gsub(/[-:.]/, '_')
end
def self.convert_from_hex?(kernel)
@@ -51,7 +51,7 @@ module Facter::Util::IP
# at the end of interfaces. So, we have to trim those trailing
# characters. I tried making the regex better but supporting all
# platforms with a single regex is probably a bit too much.
- output.scan(/^\w+[.:]?\d+[.:]?\d*[.:]?\w*/).collect { |i| i.sub(/:$/, '') }.uniq
+ output.scan(/^[-\w]+[.:]?\d+[.:]?\d*[.:]?\w*/).collect { |i| i.sub(/:$/, '') }.uniq
end
def self.get_all_interface_output
--
Packaging of Facter for debian
More information about the Pkg-puppet-devel
mailing list