# File lib/puppet/provider/service/launchd.rb, line 94
 94:     def self.get_macosx_version_major
 95:         if defined? @macosx_version_major
 96:             return @macosx_version_major
 97:         end
 98:         begin
 99:             # Make sure we've loaded all of the facts
100:             Facter.loadfacts
101: 
102:             if Facter.value(:macosx_productversion_major)
103:                 product_version_major = Facter.value(:macosx_productversion_major)
104:             else
105:                 # TODO: remove this code chunk once we require Facter 1.5.5 or higher.
106:                 Puppet.warning("DEPRECATION WARNING: Future versions of the launchd provider will require Facter 1.5.5 or newer.")            
107:                 product_version = Facter.value(:macosx_productversion)
108:                 if product_version.nil?
109:                     fail("Could not determine OS X version from Facter")
110:                 end
111:                 product_version_major = product_version.scan(/(\d+)\.(\d+)./).join(".")
112:             end
113:             if %w{10.0 10.1 10.2 10.3}.include?(product_version_major)
114:                 fail("%s is not supported by the launchd provider" % product_version_major)
115:             end
116:             @macosx_version_major = product_version_major
117:             return @macosx_version_major
118:         rescue Puppet::ExecutionFailure => detail
119:             fail("Could not determine OS X version: %s" % detail)
120:         end
121:     end