summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/puppet.rb30
-rw-r--r--lib/puppet/config_stores/rest.rb2
-rw-r--r--lib/puppet/defaults.rb2
-rw-r--r--lib/puppet/fact_stores/yaml.rb2
-rw-r--r--lib/puppet/indirector/indirection.rb4
-rw-r--r--lib/puppet/indirector/yaml.rb2
-rw-r--r--lib/puppet/module.rb4
-rw-r--r--lib/puppet/network/client/ca.rb8
-rw-r--r--lib/puppet/network/client/master.rb4
-rw-r--r--lib/puppet/network/handler/ca.rb2
-rwxr-xr-xlib/puppet/network/handler/filebucket.rb2
-rwxr-xr-xlib/puppet/network/handler/report.rb4
-rw-r--r--lib/puppet/network/server/webrick.rb2
-rw-r--r--lib/puppet/node/configuration.rb2
-rw-r--r--lib/puppet/parser/interpreter.rb2
-rw-r--r--lib/puppet/rails.rb4
-rw-r--r--lib/puppet/reference/configuration.rb2
-rw-r--r--lib/puppet/reports/rrdgraph.rb2
-rw-r--r--lib/puppet/reports/store.rb4
-rw-r--r--lib/puppet/reports/tagmail.rb2
-rw-r--r--lib/puppet/sslcertificates/ca.rb18
-rw-r--r--lib/puppet/sslcertificates/inventory.rb2
-rw-r--r--lib/puppet/sslcertificates/support.rb8
-rw-r--r--lib/puppet/util/metric.rb2
-rw-r--r--lib/puppet/util/settings.rb (renamed from lib/puppet/util/config.rb)8
-rw-r--r--lib/puppet/util/storage.rb2
26 files changed, 63 insertions, 63 deletions
diff --git a/lib/puppet.rb b/lib/puppet.rb
index b9a09bb49..949922459 100644
--- a/lib/puppet.rb
+++ b/lib/puppet.rb
@@ -12,7 +12,7 @@ require 'puppet/external/event-loop'
require 'puppet/util'
require 'puppet/util/log'
require 'puppet/util/autoload'
-require 'puppet/util/config'
+require 'puppet/util/settings'
require 'puppet/util/feature'
require 'puppet/util/suidmanager'
@@ -45,7 +45,7 @@ module Puppet
end
# the hash that determines how our system behaves
- @@config = Puppet::Util::Config.new
+ @@settings = Puppet::Util::Settings.new
# The services running in this process.
@services ||= []
@@ -76,7 +76,7 @@ module Puppet
# Store a new default value.
def self.setdefaults(section, hash)
- @@config.setdefaults(section, hash)
+ @@settings.setdefaults(section, hash)
end
# configuration parameter access and stuff
@@ -89,17 +89,17 @@ module Puppet
return false
end
else
- return @@config[param]
+ return @@settings[param]
end
end
# configuration parameter access and stuff
def self.[]=(param,value)
- @@config[param] = value
+ @@settings[param] = value
end
def self.clear
- @@config.clear
+ @@settings.clear
end
def self.debug=(value)
@@ -110,8 +110,8 @@ module Puppet
end
end
- def self.config
- @@config
+ def self.settings
+ @@settings
end
# Load all of the configuration parameters.
@@ -122,7 +122,7 @@ module Puppet
val = Puppet[:configprint]
if val == "all"
hash = {}
- Puppet.config.each do |name, obj|
+ Puppet.settings.each do |name, obj|
val = obj.value
case val
when true, false, "": val = val.inspect
@@ -134,7 +134,7 @@ module Puppet
end
elsif val =~ /,/
val.split(/\s*,\s*/).sort.each do |v|
- if Puppet.config.include?(v)
+ if Puppet.settings.include?(v)
puts "%s = %s" % [v, Puppet[v]]
else
puts "invalid parameter: %s" % v
@@ -143,7 +143,7 @@ module Puppet
end
else
val.split(/\s*,\s*/).sort.each do |v|
- if Puppet.config.include?(v)
+ if Puppet.settings.include?(v)
puts Puppet[val]
else
puts "invalid parameter: %s" % v
@@ -154,14 +154,14 @@ module Puppet
exit(0)
end
if Puppet[:genconfig]
- puts Puppet.config.to_config
+ puts Puppet.settings.to_config
exit(0)
end
end
def self.genmanifest
if Puppet[:genmanifest]
- puts Puppet.config.to_manifest
+ puts Puppet.settings.to_manifest
exit(0)
end
end
@@ -208,14 +208,14 @@ module Puppet
oldconfig ||= File.join(Puppet[:confdir], Puppet[:name].to_s + ".conf")
if FileTest.exists?(oldconfig) and Puppet[:name] != "puppet"
Puppet.warning "Individual config files are deprecated; remove %s and use puppet.conf" % oldconfig
- Puppet.config.old_parse(oldconfig)
+ Puppet.settings.old_parse(oldconfig)
return
end
# Now check for the normal config.
if Puppet[:config] and File.exists? Puppet[:config]
Puppet.debug "Parsing %s" % Puppet[:config]
- Puppet.config.parse(Puppet[:config])
+ Puppet.settings.parse(Puppet[:config])
end
end
diff --git a/lib/puppet/config_stores/rest.rb b/lib/puppet/config_stores/rest.rb
index 980968bd8..bb3d937ac 100644
--- a/lib/puppet/config_stores/rest.rb
+++ b/lib/puppet/config_stores/rest.rb
@@ -1,4 +1,4 @@
-Puppet::Util::ConfigStore.newstore(:rest) do
+Puppet::Util::SettingsStore.newstore(:rest) do
desc "Store client configurations via a REST web service."
require 'net/http'
diff --git a/lib/puppet/defaults.rb b/lib/puppet/defaults.rb
index 64f370bec..dbbe5e29d 100644
--- a/lib/puppet/defaults.rb
+++ b/lib/puppet/defaults.rb
@@ -267,7 +267,7 @@ module Puppet
)
# Define the config default.
- self.setdefaults(self.config[:name],
+ self.setdefaults(self.settings[:name],
:config => ["$confdir/puppet.conf",
"The configuration file for #{Puppet[:name]}."],
:pidfile => ["", "The pid file"],
diff --git a/lib/puppet/fact_stores/yaml.rb b/lib/puppet/fact_stores/yaml.rb
index a4b12a2e5..b33e162ba 100644
--- a/lib/puppet/fact_stores/yaml.rb
+++ b/lib/puppet/fact_stores/yaml.rb
@@ -16,7 +16,7 @@ Puppet::Util::FactStore.newstore(:yaml) do
end
def initialize
- Puppet.config.use(:yamlfacts)
+ Puppet.settings.use(:yamlfacts)
end
# Store the facts to disk.
diff --git a/lib/puppet/indirector/indirection.rb b/lib/puppet/indirector/indirection.rb
index aacad6c45..8afe0012d 100644
--- a/lib/puppet/indirector/indirection.rb
+++ b/lib/puppet/indirector/indirection.rb
@@ -47,8 +47,8 @@ class Puppet::Indirector::Indirection
# Get the name of the terminus.
unless terminus_name
param_name = "%s_terminus" % self.name
- if Puppet.config.valid?(param_name)
- terminus_name = Puppet.config[param_name]
+ if Puppet.settings.valid?(param_name)
+ terminus_name = Puppet.settings[param_name]
else
terminus_name = Puppet[:default_terminus]
end
diff --git a/lib/puppet/indirector/yaml.rb b/lib/puppet/indirector/yaml.rb
index 42f1bb703..b9ea54f39 100644
--- a/lib/puppet/indirector/yaml.rb
+++ b/lib/puppet/indirector/yaml.rb
@@ -4,7 +4,7 @@ require 'puppet/indirector/terminus'
class Puppet::Indirector::Yaml < Puppet::Indirector::Terminus
def initialize
# Make sure our base directory exists.
- Puppet.config.use(:yaml)
+ Puppet.settings.use(:yaml)
end
# Read a given name's file in and convert it from YAML.
diff --git a/lib/puppet/module.rb b/lib/puppet/module.rb
index 924958bbe..dc30d8167 100644
--- a/lib/puppet/module.rb
+++ b/lib/puppet/module.rb
@@ -9,7 +9,7 @@ class Puppet::Module
# parameter. Only consider paths that are absolute and existing
# directories
def self.modulepath(environment = nil)
- dirs = Puppet.config.value(:modulepath, environment).split(":")
+ dirs = Puppet.settings.value(:modulepath, environment).split(":")
if ENV["PUPPETLIB"]
dirs = ENV["PUPPETLIB"].split(":") + dirs
else
@@ -61,7 +61,7 @@ class Puppet::Module
if mod
return mod.template(file)
else
- return File.join(Puppet.config.value(:templatedir, environment), template)
+ return File.join(Puppet.settings.value(:templatedir, environment), template)
end
end
diff --git a/lib/puppet/network/client/ca.rb b/lib/puppet/network/client/ca.rb
index 412c9c59f..46fb9f51f 100644
--- a/lib/puppet/network/client/ca.rb
+++ b/lib/puppet/network/client/ca.rb
@@ -14,9 +14,9 @@ class Puppet::Network::Client::CA < Puppet::Network::Client
end
# This client is really only able to request certificates for the
- # current host. It uses the Puppet.config settings to figure everything out.
+ # current host. It uses the Puppet.settings settings to figure everything out.
def request_cert
- Puppet.config.use(:main, :ssl)
+ Puppet.settings.use(:main, :ssl)
if cert = read_cert
return cert
@@ -49,8 +49,8 @@ class Puppet::Network::Client::CA < Puppet::Network::Client
end
# Only write the cert out if it passes validating.
- Puppet.config.write(:hostcert) do |f| f.print cert end
- Puppet.config.write(:localcacert) do |f| f.print cacert end
+ Puppet.settings.write(:hostcert) do |f| f.print cert end
+ Puppet.settings.write(:localcacert) do |f| f.print cacert end
return @cert
end
diff --git a/lib/puppet/network/client/master.rb b/lib/puppet/network/client/master.rb
index cc66d9076..f950a6059 100644
--- a/lib/puppet/network/client/master.rb
+++ b/lib/puppet/network/client/master.rb
@@ -46,7 +46,7 @@ class Puppet::Network::Client::Master < Puppet::Network::Client
# Return the list of dynamic facts as an array of symbols
def self.dynamic_facts
- Puppet.config[:dynamicfacts].split(/\s*,\s*/).collect { |fact| fact.downcase }
+ Puppet.settings[:dynamicfacts].split(/\s*,\s*/).collect { |fact| fact.downcase }
end
# Cache the config
@@ -205,7 +205,7 @@ class Puppet::Network::Client::Master < Puppet::Network::Client
# Just so we can specify that we are "the" instance.
def initialize(*args)
- Puppet.config.use(:main, :ssl, :puppetd)
+ Puppet.settings.use(:main, :ssl, :puppetd)
super
self.class.instance = self
diff --git a/lib/puppet/network/handler/ca.rb b/lib/puppet/network/handler/ca.rb
index 422b21ae1..052eb5c19 100644
--- a/lib/puppet/network/handler/ca.rb
+++ b/lib/puppet/network/handler/ca.rb
@@ -60,7 +60,7 @@ class Puppet::Network::Handler
end
def initialize(hash = {})
- Puppet.config.use(:main, :ssl, :ca)
+ Puppet.settings.use(:main, :ssl, :ca)
if hash.include? :autosign
@autosign = hash[:autosign]
end
diff --git a/lib/puppet/network/handler/filebucket.rb b/lib/puppet/network/handler/filebucket.rb
index bb6a0e6d3..1bf8da854 100755
--- a/lib/puppet/network/handler/filebucket.rb
+++ b/lib/puppet/network/handler/filebucket.rb
@@ -64,7 +64,7 @@ class Puppet::Network::Handler # :nodoc:
end
end
- Puppet.config.use(:filebucket)
+ Puppet.settings.use(:filebucket)
@name = "Filebucket[#{@path}]"
end
diff --git a/lib/puppet/network/handler/report.rb b/lib/puppet/network/handler/report.rb
index 81aee6a3c..62e9cfdec 100755
--- a/lib/puppet/network/handler/report.rb
+++ b/lib/puppet/network/handler/report.rb
@@ -71,8 +71,8 @@ class Puppet::Network::Handler
def initialize(*args)
super
- Puppet.config.use(:reporting)
- Puppet.config.use(:metrics)
+ Puppet.settings.use(:reporting)
+ Puppet.settings.use(:metrics)
end
# Accept a report from a client.
diff --git a/lib/puppet/network/server/webrick.rb b/lib/puppet/network/server/webrick.rb
index 3af0cfd3f..f24411ab3 100644
--- a/lib/puppet/network/server/webrick.rb
+++ b/lib/puppet/network/server/webrick.rb
@@ -48,7 +48,7 @@ module Puppet
# yuck; separate http logs
file = nil
- Puppet.config.use(:main, :ssl, Puppet[:name])
+ Puppet.settings.use(:main, :ssl, Puppet[:name])
if Puppet[:name] == "puppetmasterd"
file = Puppet[:masterhttplog]
else
diff --git a/lib/puppet/node/configuration.rb b/lib/puppet/node/configuration.rb
index 360c25fc8..0ae03a651 100644
--- a/lib/puppet/node/configuration.rb
+++ b/lib/puppet/node/configuration.rb
@@ -357,7 +357,7 @@ class Puppet::Node::Configuration < Puppet::PGraph
return unless Puppet[:graph]
- Puppet.config.use(:graphing)
+ Puppet.settings.use(:graphing)
file = File.join(Puppet[:graphdir], "%s.dot" % name.to_s)
File.open(file, "w") { |f|
diff --git a/lib/puppet/parser/interpreter.rb b/lib/puppet/parser/interpreter.rb
index a4ea26572..81867c84b 100644
--- a/lib/puppet/parser/interpreter.rb
+++ b/lib/puppet/parser/interpreter.rb
@@ -68,7 +68,7 @@ class Puppet::Parser::Interpreter
elsif self.file
parser.file = self.file
else
- file = Puppet.config.value(:manifest, environment)
+ file = Puppet.settings.value(:manifest, environment)
parser.file = file
end
parser.parse
diff --git a/lib/puppet/rails.rb b/lib/puppet/rails.rb
index 670c622eb..53dafce79 100644
--- a/lib/puppet/rails.rb
+++ b/lib/puppet/rails.rb
@@ -9,7 +9,7 @@ module Puppet::Rails
# This global init does not work for testing, because we remove
# the state dir on every test.
unless ActiveRecord::Base.connected?
- Puppet.config.use(:main, :rails, :puppetmasterd)
+ Puppet.settings.use(:main, :rails, :puppetmasterd)
ActiveRecord::Base.logger = Logger.new(Puppet[:railslog])
begin
@@ -103,7 +103,7 @@ module Puppet::Rails
raise Puppet::DevError, "No activerecord, cannot init Puppet::Rails"
end
- Puppet.config.use(:puppetmasterd, :rails)
+ Puppet.settings.use(:puppetmasterd, :rails)
begin
ActiveRecord::Base.establish_connection(database_arguments())
diff --git a/lib/puppet/reference/configuration.rb b/lib/puppet/reference/configuration.rb
index 65fdbeb7d..4b09002b8 100644
--- a/lib/puppet/reference/configuration.rb
+++ b/lib/puppet/reference/configuration.rb
@@ -1,6 +1,6 @@
config = Puppet::Util::Reference.newreference(:configuration, :depth => 1, :doc => "A reference for all configuration parameters") do
docs = {}
- Puppet.config.each do |name, object|
+ Puppet.settings.each do |name, object|
docs[name] = object
end
diff --git a/lib/puppet/reports/rrdgraph.rb b/lib/puppet/reports/rrdgraph.rb
index 7209a8401..1516d331a 100644
--- a/lib/puppet/reports/rrdgraph.rb
+++ b/lib/puppet/reports/rrdgraph.rb
@@ -102,7 +102,7 @@ Puppet::Network::Handler.report.newreport(:rrdgraph) do
unless File.directory?(hostdir) and FileTest.writable?(hostdir)
# Some hackishness to create the dir with all of the right modes and ownership
- config = Puppet::Util::Config.new
+ config = Puppet::Util::Settings.new
config.setdefaults(:reports, :hostdir => {:default => hostdir, :owner => Puppet[:user], :mode => 0755, :group => Puppet[:group], :desc => "eh"})
# This creates the dir.
diff --git a/lib/puppet/reports/store.rb b/lib/puppet/reports/store.rb
index d51f50372..389de4e6e 100644
--- a/lib/puppet/reports/store.rb
+++ b/lib/puppet/reports/store.rb
@@ -1,7 +1,7 @@
require 'puppet'
Puppet::Network::Handler.report.newreport(:store, :useyaml => true) do
- Puppet.config.use(:reporting)
+ Puppet.settings.use(:reporting)
desc "Store the yaml report on disk. Each host sends its report as a YAML dump
and this just stores the file on disk, in the ``reportdir`` directory.
@@ -11,7 +11,7 @@ Puppet::Network::Handler.report.newreport(:store, :useyaml => true) do
default report)."
def mkclientdir(client, dir)
- config = Puppet::Util::Config.new
+ config = Puppet::Util::Settings.new
config.setdefaults("reportclient-#{client}",
"client-#{client}-dir" => { :default => dir,
:mode => 0750,
diff --git a/lib/puppet/reports/tagmail.rb b/lib/puppet/reports/tagmail.rb
index b62a6d2d3..8c65524ee 100644
--- a/lib/puppet/reports/tagmail.rb
+++ b/lib/puppet/reports/tagmail.rb
@@ -31,7 +31,7 @@ Puppet::Network::Handler.report.newreport(:tagmail) do
"
- Puppet.config.use(:tagmail)
+ Puppet.settings.use(:tagmail)
# Find all matching messages.
def match(taglists)
diff --git a/lib/puppet/sslcertificates/ca.rb b/lib/puppet/sslcertificates/ca.rb
index 5e355f7fe..fd416dd5e 100644
--- a/lib/puppet/sslcertificates/ca.rb
+++ b/lib/puppet/sslcertificates/ca.rb
@@ -53,7 +53,7 @@ class Puppet::SSLCertificates::CA
end
def initialize(hash = {})
- Puppet.config.use(:main, :ca, :ssl)
+ Puppet.settings.use(:main, :ca, :ssl)
self.setconfig(hash)
if Puppet[:capass]
@@ -73,7 +73,7 @@ class Puppet::SSLCertificates::CA
self.getcert
init_crl
unless FileTest.exists?(@config[:serial])
- Puppet.config.write(:serial) do |f|
+ Puppet.settings.write(:serial) do |f|
f << "%04X" % 1
end
end
@@ -85,7 +85,7 @@ class Puppet::SSLCertificates::CA
20.times { pass += (rand(74) + 48).chr }
begin
- Puppet.config.write(:capass) { |f| f.print pass }
+ Puppet.settings.write(:capass) { |f| f.print pass }
rescue Errno::EACCES => detail
raise Puppet::Error, detail.to_s
end
@@ -163,10 +163,10 @@ class Puppet::SSLCertificates::CA
Puppet::Util::SUIDManager.asuser(Puppet[:user], Puppet[:group]) do
@cert = cert.mkselfsigned
end
- Puppet.config.write(:cacert) do |f|
+ Puppet.settings.write(:cacert) do |f|
f.puts @cert.to_pem
end
- Puppet.config.write(:capub) do |f|
+ Puppet.settings.write(:capub) do |f|
f.puts @cert.public_key
end
return cert
@@ -201,7 +201,7 @@ class Puppet::SSLCertificates::CA
# Take the Puppet config and store it locally.
def setconfig(hash)
@config = {}
- Puppet.config.params("ca").each { |param|
+ Puppet.settings.params("ca").each { |param|
param = param.intern if param.is_a? String
if hash.include?(param)
@config[param] = hash[param]
@@ -303,7 +303,7 @@ class Puppet::SSLCertificates::CA
raise Puppet::Error, "Certificate request for %s already exists" % host
end
- Puppet.config.writesub(:csrdir, csrfile) do |f|
+ Puppet.settings.writesub(:csrdir, csrfile) do |f|
f.print csr.to_pem
end
end
@@ -319,7 +319,7 @@ class Puppet::SSLCertificates::CA
end
Puppet::SSLCertificates::Inventory::add(cert)
- Puppet.config.writesub(:signeddir, certfile) do |f|
+ Puppet.settings.writesub(:signeddir, certfile) do |f|
f.print cert.to_pem
end
end
@@ -389,7 +389,7 @@ class Puppet::SSLCertificates::CA
@crl.next_update = now + 5 * 365*24*60*60
sign_with_key(@crl)
- Puppet.config.write(:cacrl) do |f|
+ Puppet.settings.write(:cacrl) do |f|
f.puts @crl.to_pem
end
end
diff --git a/lib/puppet/sslcertificates/inventory.rb b/lib/puppet/sslcertificates/inventory.rb
index d475c1c86..14d2155a8 100644
--- a/lib/puppet/sslcertificates/inventory.rb
+++ b/lib/puppet/sslcertificates/inventory.rb
@@ -11,7 +11,7 @@ module Puppet::SSLCertificates
inited = false
end
- Puppet.config.write(:cert_inventory, "a") do |f|
+ Puppet.settings.write(:cert_inventory, "a") do |f|
f.puts((inited ? nil : self.init).to_s + format(cert))
end
end
diff --git a/lib/puppet/sslcertificates/support.rb b/lib/puppet/sslcertificates/support.rb
index e37a52038..c8d2e846b 100644
--- a/lib/puppet/sslcertificates/support.rb
+++ b/lib/puppet/sslcertificates/support.rb
@@ -44,7 +44,7 @@ module Puppet::SSLCertificates::Support
unless instance_variable_get(var)
unless cert = send(reader)
cert = send(maker)
- Puppet.config.write(param) { |f| f.puts cert.to_pem }
+ Puppet.settings.write(param) { |f| f.puts cert.to_pem }
end
instance_variable_set(var, cert)
end
@@ -59,7 +59,7 @@ module Puppet::SSLCertificates::Support
# Our key meta programming can only handle one file, so we have
# to separately write out the public key.
- Puppet.config.write(:hostpubkey) do |f|
+ Puppet.settings.write(:hostpubkey) do |f|
f.print key.public_key.to_pem
end
return key
@@ -104,8 +104,8 @@ module Puppet::SSLCertificates::Support
if cert.nil? or cert == ""
return nil
end
- Puppet.config.write(:hostcert) do |f| f.print cert end
- Puppet.config.write(:localcacert) do |f| f.print cacert end
+ Puppet.settings.write(:hostcert) do |f| f.print cert end
+ Puppet.settings.write(:localcacert) do |f| f.print cacert end
#File.open(@certfile, "w", 0644) { |f| f.print cert }
#File.open(@cacertfile, "w", 0644) { |f| f.print cacert }
begin
diff --git a/lib/puppet/util/metric.rb b/lib/puppet/util/metric.rb
index 13bbc2af1..133aa9c2a 100644
--- a/lib/puppet/util/metric.rb
+++ b/lib/puppet/util/metric.rb
@@ -21,7 +21,7 @@ class Puppet::Util::Metric
end
def create(start = nil)
- Puppet.config.use(:metrics)
+ Puppet.settings.use(:metrics)
start ||= Time.now.to_i - 5
diff --git a/lib/puppet/util/config.rb b/lib/puppet/util/settings.rb
index 4b6ae9e5b..f2af13dc2 100644
--- a/lib/puppet/util/config.rb
+++ b/lib/puppet/util/settings.rb
@@ -5,7 +5,7 @@ require 'getoptlong'
# The class for handling configuration files.
-class Puppet::Util::Config
+class Puppet::Util::Settings
include Enumerable
include Puppet::Util
@@ -502,7 +502,7 @@ class Puppet::Util::Config
end
bucket = Puppet::TransBucket.new
- bucket.type = "Configuration"
+ bucket.type = "Settings"
bucket.name = section
bucket.push(*objects)
bucket.keyword = "class"
@@ -604,7 +604,7 @@ Generated on #{Time.now}.
else
topbucket.name = "top"
end
- topbucket.type = "Configuration"
+ topbucket.type = "Settings"
topbucket.top = true
# Now iterate over each section
@@ -1190,7 +1190,7 @@ Generated on #{Time.now}.
name = $1
unless @parent.include?(name)
raise ArgumentError,
- "Configuration parameter '%s' is undefined" %
+ "Settings parameter '%s' is undefined" %
name
end
}
diff --git a/lib/puppet/util/storage.rb b/lib/puppet/util/storage.rb
index cd41aa572..9e99057d9 100644
--- a/lib/puppet/util/storage.rb
+++ b/lib/puppet/util/storage.rb
@@ -46,7 +46,7 @@ class Puppet::Util::Storage
self.init
def self.load
- Puppet.config.use(:main)
+ Puppet.settings.use(:main)
unless File.exists?(Puppet[:statefile])
unless defined? @@state and ! @@state.nil?