diff options
author | Luke Kanies <luke@madstop.com> | 2008-05-16 10:38:15 -0500 |
---|---|---|
committer | Luke Kanies <luke@madstop.com> | 2008-05-16 10:38:15 -0500 |
commit | bb41db0bf4221e394411d2a82b6de264b557fb95 (patch) | |
tree | fbc8773d5e6b5a708db24e3943ca3b3fb7f98880 /lib/facter/util | |
parent | 07a3d479b0e31aa7a1f8e6d0e178e440adc57030 (diff) | |
download | facter-bb41db0bf4221e394411d2a82b6de264b557fb95.tar.gz facter-bb41db0bf4221e394411d2a82b6de264b557fb95.tar.xz facter-bb41db0bf4221e394411d2a82b6de264b557fb95.zip |
Switching to a search path registration system.
Facter no longer knows anything about Puppet, so there's
no inter-dependency issue.
Diffstat (limited to 'lib/facter/util')
-rw-r--r-- | lib/facter/util/loader.rb | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/lib/facter/util/loader.rb b/lib/facter/util/loader.rb index 44a0338..c6013cc 100644 --- a/lib/facter/util/loader.rb +++ b/lib/facter/util/loader.rb @@ -51,18 +51,9 @@ class Facter::Util::Loader result += ENV["FACTERLIB"].split(":") end - # LAK:NOTE We have to be this careful because facter gets loaded - # *very* early in Puppet's lifecycle, and this essentially - # builds interdependencies between the applications, which is - # tricky. - if defined?(Puppet) and Puppet.respond_to?(:settings) - if f = Puppet.settings.value(:factdest) - result << f - end - if l = Puppet.settings.value(:libdir) - result << File.join(l, "facter") - end - end + # This allows others to register additional paths we should search. + result += Facter.search_path + result end |