diff options
author | Nigel Kersten <nigelk@google.com> | 2008-12-08 18:37:27 -0800 |
---|---|---|
committer | James Turnbull <james@lovedthanlost.net> | 2008-12-09 14:25:55 +1100 |
commit | 4b2bdf981431b11b6c9829d3c2d81abe0f1c71ba (patch) | |
tree | aa6c84a5d436899aa6abf58dceb35179f180cd65 /lib/puppet | |
parent | 544a3e1ecbbb59170c72c649b281a54fd3b41f14 (diff) | |
download | puppet-4b2bdf981431b11b6c9829d3c2d81abe0f1c71ba.tar.gz puppet-4b2bdf981431b11b6c9829d3c2d81abe0f1c71ba.tar.xz puppet-4b2bdf981431b11b6c9829d3c2d81abe0f1c71ba.zip |
Fix the spec tests to work on other platforms, do the confine around OS X versions more sanely
Diffstat (limited to 'lib/puppet')
-rw-r--r-- | lib/puppet/provider/macauthorization/macauthorization.rb | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/lib/puppet/provider/macauthorization/macauthorization.rb b/lib/puppet/provider/macauthorization/macauthorization.rb index 67e4e06bd..2cdef6c12 100644 --- a/lib/puppet/provider/macauthorization/macauthorization.rb +++ b/lib/puppet/provider/macauthorization/macauthorization.rb @@ -12,10 +12,15 @@ Puppet::Type.type(:macauthorization).provide :macauthorization, :parent => Puppe confine :operatingsystem => :darwin - product_version = sw_vers "-productVersion" - - confine :true => if /^10.5/.match(product_version) or /^10.6/.match(product_version) - true + # This should be confined based on macosx_productversion once + # http://projects.reductivelabs.com/issues/show/1796 + # is resolved. + if FileTest.exists?("/usr/bin/sw_vers") + product_version = sw_vers "-productVersion" + + confine :true => if /^10.5/.match(product_version) or /^10.6/.match(product_version) + true + end end defaultfor :operatingsystem => :darwin |