diff options
| author | Luke Kanies <luke@madstop.com> | 2008-03-05 12:30:45 -0600 |
|---|---|---|
| committer | Luke Kanies <luke@madstop.com> | 2008-03-05 12:30:45 -0600 |
| commit | c2b33acd5c1e6fe4021d7609f806b7bd8af834f8 (patch) | |
| tree | c2c725a171d02d1ac304547d23716b9524beaabf /lib/puppet/network | |
| parent | 93a2189ef7c31bd31821eddc87f91b02b7f5a233 (diff) | |
| parent | 443db2009d0f5033eb51ebd210af2a198572fad0 (diff) | |
| download | puppet-c2b33acd5c1e6fe4021d7609f806b7bd8af834f8.tar.gz puppet-c2b33acd5c1e6fe4021d7609f806b7bd8af834f8.tar.xz puppet-c2b33acd5c1e6fe4021d7609f806b7bd8af834f8.zip | |
Merge branch '0.24.x'
Diffstat (limited to 'lib/puppet/network')
| -rw-r--r-- | lib/puppet/network/client.rb | 2 | ||||
| -rw-r--r-- | lib/puppet/network/client/master.rb | 11 | ||||
| -rwxr-xr-x | lib/puppet/network/handler/fileserver.rb | 4 |
3 files changed, 10 insertions, 7 deletions
diff --git a/lib/puppet/network/client.rb b/lib/puppet/network/client.rb index 0a0a72345..cf1782f79 100644 --- a/lib/puppet/network/client.rb +++ b/lib/puppet/network/client.rb @@ -7,6 +7,8 @@ require 'puppet/util/subclass_loader' require 'puppet/util/methodhelper' require 'puppet/sslcertificates/support' +require 'puppet/network/handler' + require 'net/http' # Some versions of ruby don't have this method defined, which basically causes diff --git a/lib/puppet/network/client/master.rb b/lib/puppet/network/client/master.rb index 390f3d4e2..913c51b3d 100644 --- a/lib/puppet/network/client/master.rb +++ b/lib/puppet/network/client/master.rb @@ -26,14 +26,15 @@ class Puppet::Network::Client::Master < Puppet::Network::Client down = Puppet[:downcasefacts] - facts = {} - Facter.each { |name,fact| + facts = Facter.to_hash.inject({}) do |newhash, array| + name, fact = array if down - facts[name] = fact.to_s.downcase + newhash[name] = fact.to_s.downcase else - facts[name] = fact.to_s + newhash[name] = fact.to_s end - } + newhash + end # Add our client version to the list of facts, so people can use it # in their manifests diff --git a/lib/puppet/network/handler/fileserver.rb b/lib/puppet/network/handler/fileserver.rb index a9a95bcfe..751a77220 100755 --- a/lib/puppet/network/handler/fileserver.rb +++ b/lib/puppet/network/handler/fileserver.rb @@ -69,8 +69,8 @@ class Puppet::Network::Handler mount.debug("Describing %s for %s" % [url, client]) if client - # Remove any leading slashes, since Metadata doesn't like them, yo. - metadata = Puppet::FileServing::Metadata.new(url, :path => mount.path(client), :relative_path => path.sub(/^\//, ''), :links => links) + # use the mount to resolve the path for us. + metadata = Puppet::FileServing::Metadata.new(url, :path => mount.file_path(path, client), :links => links) return "" unless metadata.exist? |
