Signed-off-by: Nigel Kersten <[email protected]>
---
lib/facter/util/macosx.rb | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/lib/facter/util/macosx.rb b/lib/facter/util/macosx.rb
index 6e7986e..f5f83f3 100644
--- a/lib/facter/util/macosx.rb
+++ b/lib/facter/util/macosx.rb
@@ -58,6 +58,11 @@ module Facter::Util::Macosx
[ "productName", "productVersion", "buildVersion" ].each do |option|
ver["macosx_#{option}"] = %x{sw_vers -#{option}}.strip
end
+ productversion = ver["macosx_productVersion"]
+ if not productversion.nil?
+ ver["macosx_productversion_major"] =
productversion.scan(/(\d+\.\d+)/)[0][0]
+ ver["macosx_productversion_minor"] =
productversion.scan(/(\d+)\.(\d+)\.(\d+)/)[0].last
+ end
ver
end
end
--
1.5.3.1
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---