summaryrefslogtreecommitdiffstats
path: root/lib/puppet/network
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2009-05-14 11:36:20 -0500
committerJames Turnbull <james@lovedthanlost.net>2009-05-15 10:01:26 +1000
commitfb957ccb6636ce86bd98c141d5818c54bc0d4659 (patch)
tree4ee5fd0ddc1e09dbb72bc06e6fcfd0caeee04f38 /lib/puppet/network
parentc6084093e67b1e415e49c192b3ac6f6b9aebc4ba (diff)
downloadpuppet-fb957ccb6636ce86bd98c141d5818c54bc0d4659.tar.gz
puppet-fb957ccb6636ce86bd98c141d5818c54bc0d4659.tar.xz
puppet-fb957ccb6636ce86bd98c141d5818c54bc0d4659.zip
Modules now can find their own paths
Previously, when you created a module you had to specify the path. Now Module instances can use the module path to look up their paths, and there are methods for determining whether the module is present (if the path is present). Also cleaned up the methods for figuring out what's in the module (plugins, etc.). Signed-off-by: Luke Kanies <luke@madstop.com>
Diffstat (limited to 'lib/puppet/network')
-rwxr-xr-xlib/puppet/network/handler/fileserver.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/puppet/network/handler/fileserver.rb b/lib/puppet/network/handler/fileserver.rb
index aad3b98be..50e2614aa 100755
--- a/lib/puppet/network/handler/fileserver.rb
+++ b/lib/puppet/network/handler/fileserver.rb
@@ -254,8 +254,8 @@ class Puppet::Network::Handler
end
# And use the environment to look up the module.
- if mod = Puppet::Node::Environment.new(env).module(module_name)
- return @mounts[MODULES].copy(mod.name, mod.files)
+ if mod = Puppet::Node::Environment.new(env).module(module_name) and mod.files?
+ return @mounts[MODULES].copy(mod.name, mod.file_directory)
else
return nil
end
@@ -744,7 +744,7 @@ class Puppet::Network::Handler
private
def valid_modules(client)
- Puppet::Node::Environment.new.modules.find_all { |mod| mod.plugins? }
+ Puppet::Node::Environment.new.modules.find_all { |mod| mod.exist? }
end
def add_to_filetree(f, filetree)