diff options
author | Marc Fournier <marc.fournier@camptocamp.com> | 2010-05-12 12:51:14 +0200 |
---|---|---|
committer | Paul Nasrat <pnasrat@googlemail.com> | 2010-08-04 13:25:47 +0100 |
commit | e9a60bc1d403d280016402199a3d396078577d2c (patch) | |
tree | 2b0f03ee6023aa08bf056d187335255f379d3847 /lib | |
parent | be411c00ee47e62bf0408dbb7c93c8dc6a9d9381 (diff) | |
download | facter-e9a60bc1d403d280016402199a3d396078577d2c.tar.gz facter-e9a60bc1d403d280016402199a3d396078577d2c.tar.xz facter-e9a60bc1d403d280016402199a3d396078577d2c.zip |
Facter::Manufacturer - sunos test + simplified regex
The 2nd regex (with the 0x\d+) got removed because it appears
to never be used, even on SunOS, for which it has been
introduced (99833a1b / #1793).
The 3dn regex is changed to clearly confine the value between
mandatory newlines/whitespaces.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/facter/util/manufacturer.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/facter/util/manufacturer.rb b/lib/facter/util/manufacturer.rb index b781e12..112380b 100644 --- a/lib/facter/util/manufacturer.rb +++ b/lib/facter/util/manufacturer.rb @@ -35,7 +35,7 @@ module Facter::Manufacturer v.each do |v2| v2.each_pair do |value,facterkey| output.split(splitstr).each do |line| - if line =~ /#{key}/ and ( line =~ /#{value} 0x\d+ \(([-\w].*)\)\n*/ or line =~ /#{value} ([-\w].*)\n*/ ) + if line =~ /#{key}/ and line =~ /\n\s+#{value} (.+)\n/ result = $1.strip Facter.add(facterkey) do confine :kernel => [ :linux, :freebsd, :netbsd, :sunos ] |