On Tue Mar 10, 2009 at 16:13:40 -0400, Todd Zullinger wrote:
>
>This allows operatingsystemrelease to properly determine the release for
>various Red Hat based distros, including the point portion of the
>release.
>
>Signed-off-by: Todd Zullinger <[email protected]>
>---
> lib/facter/operatingsystemrelease.rb |    2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
>diff --git a/lib/facter/operatingsystemrelease.rb 
>b/lib/facter/operatingsystemrelease.rb
>index 2f76817..18199bd 100644
>--- a/lib/facter/operatingsystemrelease.rb
>+++ b/lib/facter/operatingsystemrelease.rb
>@@ -15,7 +15,7 @@ Facter.add(:operatingsystemrelease) do
>             line = f.readline.chomp
>             if line =~ /\(Rawhide\)$/
>                 "Rawhide"
>-            elsif line =~ /release (\d+)/
>+            elsif line =~ /release (\d[\d.]*)/

Ahh! That breaks the behaviour I was trying to fix by reporting the
inconsistency. So now instead of having releases numbered 3, 4, 5 across the
board it could well end up 3.8, 4.6, 5.3 etc which in my opinion is much
harder to make use of since Puppet conditionals don't support substring
matching.

I'm not sure what to suggest though, but I guess there are a few
alternatives:
 * limit $operatingsystemrelease output to only the major release integer
 * allow point release output with $operatingsystemrelease, and create a new
   variable $operatingsystemmajrelease which only contains the major release
   integer
 * allow point release output with $operatingsystemrelease and add substring
   matching of variables in conditionals in puppet

Your thoughts?

>                 $1
>             end
>         end
>-- 
>1.6.2
>
>-- 
>Todd        OpenPGP -> KeyID: 0xBEAF0CE3 | URL: www.pobox.com/~tmz/pgp
>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>Love is a snowmobile racing across the tundra. Suddenly it flips,
>pinning you underneath. At night, the ice weasels come.
>    -- Matt Groening
>
>
>>

-- 
Regards,
Oliver Hookins
Anchor Systems

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to