diff options
| author | Luke Kanies <luke@madstop.com> | 2007-11-24 23:17:57 -0600 |
|---|---|---|
| committer | Luke Kanies <luke@madstop.com> | 2007-11-24 23:17:57 -0600 |
| commit | 4e9c39e6a7ca5ebb9d8343d1e6b835e24c257200 (patch) | |
| tree | 431872a6909aab930d4585d1b4b4d730f4bfb703 /lib/puppet/util/settings.rb | |
| parent | 7eb09abebb91a567b081a651fce179acfadfb7c0 (diff) | |
| parent | b575d1585322709604f558742dfd6f5ce412b342 (diff) | |
| download | puppet-4e9c39e6a7ca5ebb9d8343d1e6b835e24c257200.tar.gz puppet-4e9c39e6a7ca5ebb9d8343d1e6b835e24c257200.tar.xz puppet-4e9c39e6a7ca5ebb9d8343d1e6b835e24c257200.zip | |
Merge branch 'plugins_mount', fixing #891.
Conflicts:
CHANGELOG
Diffstat (limited to 'lib/puppet/util/settings.rb')
| -rw-r--r-- | lib/puppet/util/settings.rb | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/puppet/util/settings.rb b/lib/puppet/util/settings.rb index bac832812..30968db84 100644 --- a/lib/puppet/util/settings.rb +++ b/lib/puppet/util/settings.rb @@ -516,6 +516,7 @@ class Puppet::Util::Settings # pointless, but they help break things up a bit, anyway. def setdefaults(section, defs) section = symbolize(section) + call = [] defs.each { |name, hash| if hash.is_a? Array unless hash.length == 2 @@ -540,7 +541,14 @@ class Puppet::Util::Settings @shortnames[short] = tryconfig end @config[name] = tryconfig + + # Collect the settings that need to have their hooks called immediately. + # We have to collect them so that we can be sure we're fully initialized before + # the hook is called. + call << tryconfig if tryconfig.call_on_define } + + call.each { |setting| setting.handle(self.value(setting.name)) } end # Create a timer to check whether the file should be reparsed. @@ -959,7 +967,7 @@ Generated on #{Time.now}. # The base element type. class CElement - attr_accessor :name, :section, :default, :parent, :setbycli + attr_accessor :name, :section, :default, :parent, :setbycli, :call_on_define attr_reader :desc, :short # Unset any set value. |
