summaryrefslogtreecommitdiffstats
path: root/lib/puppet
diff options
context:
space:
mode:
Diffstat (limited to 'lib/puppet')
-rw-r--r--lib/puppet/client/master.rb12
-rw-r--r--lib/puppet/configuration.rb2
2 files changed, 11 insertions, 3 deletions
diff --git a/lib/puppet/client/master.rb b/lib/puppet/client/master.rb
index e20203fd1..972fcb19c 100644
--- a/lib/puppet/client/master.rb
+++ b/lib/puppet/client/master.rb
@@ -16,7 +16,9 @@ class Puppet::Client::MasterClient < Puppet::Client
configuration will not compile. This option is useful for testing
new configurations, where you want to fix the broken configuration
rather than reverting to a known-good one."
- ]
+ ],
+ :downcasefacts => [false,
+ "Whether facts should be made all lowercase when sent to the server."]
)
Puppet.setdefaults(:puppetd,
@@ -80,10 +82,16 @@ class Puppet::Client::MasterClient < Puppet::Client
if Puppet[:factsync]
self.getfacts()
end
+
+ down = Puppet[:downcasefacts]
facts = {}
Facter.each { |name,fact|
- facts[name] = fact.to_s
+ if down
+ facts[name] = fact.to_s.downcase
+ else
+ facts[name] = fact.to_s
+ end
}
# Add our client version to the list of facts, so people can use it
diff --git a/lib/puppet/configuration.rb b/lib/puppet/configuration.rb
index f67be5999..b2b0046a5 100644
--- a/lib/puppet/configuration.rb
+++ b/lib/puppet/configuration.rb
@@ -4,7 +4,7 @@ module Puppet
# use basedirs that are in the user's home directory.
conf = nil
var = nil
- if self.name == "puppet" and Puppet::SUIDManager.uid != 0
+ if self.name != "puppetmasterd" and Puppet::SUIDManager.uid != 0
conf = File.expand_path("~/.puppet")
var = File.expand_path("~/.puppet/var")
else