summaryrefslogtreecommitdiffstats
path: root/lib/puppet/network/client
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2007-11-24 18:36:51 -0600
committerLuke Kanies <luke@madstop.com>2007-11-24 18:36:51 -0600
commit3fb8e2e3097c0a9ef0c534a9c96fe02b43b5e38c (patch)
tree66b24714adc7032d44044bfb7a11374522691169 /lib/puppet/network/client
parent0e1b6e8ac6f95bd7fc161a1d4da3a9295ff5c65b (diff)
downloadpuppet-3fb8e2e3097c0a9ef0c534a9c96fe02b43b5e38c.tar.gz
puppet-3fb8e2e3097c0a9ef0c534a9c96fe02b43b5e38c.tar.xz
puppet-3fb8e2e3097c0a9ef0c534a9c96fe02b43b5e38c.zip
Applying the rest of Matt Palmer's patches
related to providing a plugin mount.
Diffstat (limited to 'lib/puppet/network/client')
-rw-r--r--lib/puppet/network/client/master.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/puppet/network/client/master.rb b/lib/puppet/network/client/master.rb
index ea351ddc3..e0a51513c 100644
--- a/lib/puppet/network/client/master.rb
+++ b/lib/puppet/network/client/master.rb
@@ -436,6 +436,21 @@ class Puppet::Network::Client::Master < Puppet::Network::Client
Puppet.warning "Could not load #{type} %s: %s" % [fqfile, detail]
end
end
+ ensure
+ # For some reason, the libdir doesn't end up in the load path
+ # reliably, so we might need to add it here to make sure those shiny
+ # new facts get picked up by My Friend Facter.
+ $:.unshift(Puppet[:libdir]) unless $:.include?(Puppet[:libdir])
+ # Reload everything.
+ Facter.clear
+ if Facter.respond_to? :loadfacts
+ Facter.loadfacts
+ elsif Facter.respond_to? :load
+ Facter.load
+ else
+ raise Puppet::Error,
+ "You must upgrade your version of Facter to use centralized facts"
+ end
end
def self.loadfacts