diff options
| author | Luke Kanies <luke@madstop.com> | 2007-11-24 23:16:47 -0600 |
|---|---|---|
| committer | Luke Kanies <luke@madstop.com> | 2007-11-24 23:16:47 -0600 |
| commit | b575d1585322709604f558742dfd6f5ce412b342 (patch) | |
| tree | 34e8049bf27383cb19ea23edf4d7d2a870eb7b48 /lib/puppet/util | |
| parent | 3fb8e2e3097c0a9ef0c534a9c96fe02b43b5e38c (diff) | |
| download | puppet-b575d1585322709604f558742dfd6f5ce412b342.tar.gz puppet-b575d1585322709604f558742dfd6f5ce412b342.tar.xz puppet-b575d1585322709604f558742dfd6f5ce412b342.zip | |
Integrating Matt Palmer's patch to provide a 'plugins'
mount, fixing #891. The patch was ported to the current
code by David Schmitt, I applied the rest of Matt's
patches, and I then fixed all of the code so that the
tests passed.
The primary change I had to make to the patch was reenabling
host expansion in paths -- his patch had disabled it.
Diffstat (limited to 'lib/puppet/util')
| -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 1db396dc4..957a6e7b9 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. |
