diff options
author | Luke Kanies <luke@madstop.com> | 2008-09-23 22:31:55 -0500 |
---|---|---|
committer | Luke Kanies <luke@madstop.com> | 2008-09-23 22:31:55 -0500 |
commit | 4aeabbbb2163684ff7064198c653cd60d46e5717 (patch) | |
tree | 7c3593bde6b7f28f3e20444a576eb37338cced14 /install.rb | |
parent | 5b9dd01326a61b9ae89ae978e29a8170f76deb5e (diff) | |
parent | 8d5ded09b9c9c944695c015e6e95b10ccebd6fb5 (diff) | |
download | puppet-4aeabbbb2163684ff7064198c653cd60d46e5717.tar.gz puppet-4aeabbbb2163684ff7064198c653cd60d46e5717.tar.xz puppet-4aeabbbb2163684ff7064198c653cd60d46e5717.zip |
Merge branch '0.24.x'
Conflicts:
lib/puppet/metatype/container.rb
lib/puppet/metatype/instances.rb
lib/puppet/metatype/metaparams.rb
lib/puppet/metatype/relationships.rb
lib/puppet/metatype/schedules.rb
Diffstat (limited to 'install.rb')
-rwxr-xr-x | install.rb | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/install.rb b/install.rb index a2cbdb429..c99d7dacd 100755 --- a/install.rb +++ b/install.rb @@ -60,6 +60,7 @@ rescue end PREREQS = %w{openssl facter xmlrpc/client xmlrpc/server cgi} +MIN_FACTER_VERSION = 1.5 InstallOptions = OpenStruct.new @@ -102,7 +103,7 @@ def do_man(man, strip = 'man/') omf = File.join(InstallOptions.man_dir, mf.gsub(/#{strip}/, '')) om = File.dirname(omf) File.makedirs(om, true) - File.chmod(0644, om) + File.chmod(0755, om) File.install(mf, omf, 0644, true) gzip = %x{which gzip} gzip.chomp! @@ -115,6 +116,15 @@ def check_prereqs PREREQS.each { |pre| begin require pre + if pre == "facter" + # to_f isn't quite exact for strings like "1.5.1" but is good + # enough for this purpose. + facter_version = Facter.version.to_f + if facter_version < MIN_FACTER_VERSION + puts "Facter version: %s; minimum required: %s; cannot install" % [facter_version, MIN_FACTER_VERSION] + exit -1 + end + end rescue LoadError puts "Could not load %s; cannot install" % pre exit -1 |