summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2007-08-27 17:38:39 -0500
committerLuke Kanies <luke@madstop.com>2007-08-27 17:38:39 -0500
commit2625eb1db70361f9f14710ccc36090374ee282fb (patch)
tree7fa8a8f8fe2d813c4b22a035159b466048715bb2 /lib
parent1de5ae0da0d336f1b96ceaac5aca1dfed4169460 (diff)
downloadpuppet-2625eb1db70361f9f14710ccc36090374ee282fb.tar.gz
puppet-2625eb1db70361f9f14710ccc36090374ee282fb.tar.xz
puppet-2625eb1db70361f9f14710ccc36090374ee282fb.zip
Making a couple of small bugfixes in the configuration subsystem
Diffstat (limited to 'lib')
-rw-r--r--lib/puppet/dsl.rb4
-rw-r--r--lib/puppet/network/handler/configuration.rb5
-rw-r--r--lib/puppet/util/config.rb2
3 files changed, 8 insertions, 3 deletions
diff --git a/lib/puppet/dsl.rb b/lib/puppet/dsl.rb
index bd0fcbf96..793578bca 100644
--- a/lib/puppet/dsl.rb
+++ b/lib/puppet/dsl.rb
@@ -260,8 +260,8 @@ module Puppet
@node = Puppet::Node.new(Facter.value(:hostname))
@node.parameters = Facter.to_hash
@interp = Puppet::Parser::Interpreter.new :Code => ""
- @config = Puppet::Parser::Configuration.new(@node, @interp.parser)
- @scope = @config.topscope
+ @compile = Puppet::Parser::Compile.new(@node, @interp.send(:parser, Puppet[:environment]))
+ @scope = @compile.topscope
end
@scope
end
diff --git a/lib/puppet/network/handler/configuration.rb b/lib/puppet/network/handler/configuration.rb
index b2b16d022..1dbb16370 100644
--- a/lib/puppet/network/handler/configuration.rb
+++ b/lib/puppet/network/handler/configuration.rb
@@ -22,6 +22,11 @@ class Puppet::Network::Handler
# Compile a node's configuration.
def configuration(key, client = nil, clientip = nil)
+ # If we want to use the cert name as our key
+ if Puppet[:node_name] == 'cert' and client
+ key = client
+ end
+
# Note that this is reasonable, because either their node source should actually
# know about the node, or they should be using the ``none`` node source, which
# will always return data.
diff --git a/lib/puppet/util/config.rb b/lib/puppet/util/config.rb
index fb1c01d56..f5cc4bcce 100644
--- a/lib/puppet/util/config.rb
+++ b/lib/puppet/util/config.rb
@@ -175,7 +175,7 @@ class Puppet::Util::Config
# Handle a command-line argument.
def handlearg(opt, value = nil)
- clear(true)
+ @cache.clear
value = munge_value(value) if value
str = opt.sub(/^--/,'')
bool = true