summaryrefslogtreecommitdiffstats
path: root/lib/puppet/indirector
diff options
context:
space:
mode:
authorLuke Kanies <luke@reductivelabs.com>2010-01-06 16:19:09 -0800
committertest branch <puppet-dev@googlegroups.com>2010-02-17 06:50:53 -0800
commit804105d925b526bcf209910172bc14bdeafaf4e7 (patch)
treec83327108bd8aa40d041a0ea239bc4f21519d8b4 /lib/puppet/indirector
parent26b272b218b02115ce66edbc6dd4cffd231105ab (diff)
downloadpuppet-804105d925b526bcf209910172bc14bdeafaf4e7.tar.gz
puppet-804105d925b526bcf209910172bc14bdeafaf4e7.tar.xz
puppet-804105d925b526bcf209910172bc14bdeafaf4e7.zip
Moving Rails initialization to Compiler terminus
It was previously handled by the Interpreter, but we're planning on getting of that. Signed-off-by: Luke Kanies <luke@reductivelabs.com>
Diffstat (limited to 'lib/puppet/indirector')
-rw-r--r--lib/puppet/indirector/catalog/compiler.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/puppet/indirector/catalog/compiler.rb b/lib/puppet/indirector/catalog/compiler.rb
index 4f6b0602a..ecb1c74e1 100644
--- a/lib/puppet/indirector/catalog/compiler.rb
+++ b/lib/puppet/indirector/catalog/compiler.rb
@@ -49,6 +49,7 @@ class Puppet::Resource::Catalog::Compiler < Puppet::Indirector::Code
def initialize
set_server_facts
+ setup_database_backend if Puppet[:storeconfigs]
end
# Create/return our interpreter.
@@ -163,6 +164,11 @@ class Puppet::Resource::Catalog::Compiler < Puppet::Indirector::Code
end
end
+ def setup_database_backend
+ raise Puppet::Error, "Rails is missing; cannot store configurations" unless Puppet.features.rails?
+ Puppet::Rails.init
+ end
+
# Mark that the node has checked in. LAK:FIXME this needs to be moved into
# the Node class, or somewhere that's got abstract backends.
def update_node_check(node)