summaryrefslogtreecommitdiffstats
path: root/install.rb
diff options
context:
space:
mode:
authorJames Turnbull <james@lovedthanlost.net>2008-09-13 14:21:06 +1000
committerJames Turnbull <james@lovedthanlost.net>2008-09-13 14:21:06 +1000
commita7306e14b9aa064218d051602715c987aebb8417 (patch)
treee47db618c76b77f1fa384f1f806ec59ed136c641 /install.rb
parent758505b9e3bcb2c45da30d62350534c232f1bf98 (diff)
downloadpuppet-a7306e14b9aa064218d051602715c987aebb8417.tar.gz
puppet-a7306e14b9aa064218d051602715c987aebb8417.tar.xz
puppet-a7306e14b9aa064218d051602715c987aebb8417.zip
Fixed #1553 - Puppet and Facter cannot both install the plist module into two different locations
Diffstat (limited to 'install.rb')
-rwxr-xr-xinstall.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/install.rb b/install.rb
index 73bcc6db5..3fa3822c5 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
@@ -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