diff options
author | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2007-01-23 04:01:04 +0000 |
---|---|---|
committer | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2007-01-23 04:01:04 +0000 |
commit | bfb5506ee194a1c45c18d2eb60aa0af590fffa7f (patch) | |
tree | fef59e9d564c1ffbee98322ef1cd014980c7ee85 /lib | |
parent | 53c3f5a0dba8e69aa9c668318f5c1004f0c84b08 (diff) | |
download | puppet-bfb5506ee194a1c45c18d2eb60aa0af590fffa7f.tar.gz puppet-bfb5506ee194a1c45c18d2eb60aa0af590fffa7f.tar.xz puppet-bfb5506ee194a1c45c18d2eb60aa0af590fffa7f.zip |
Fixing #416. There is now an option (downcasefacts) that determines whether facts are downcased by the client.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2076 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib')
-rw-r--r-- | lib/puppet/client/master.rb | 12 | ||||
-rw-r--r-- | lib/puppet/configuration.rb | 2 |
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 |