summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2007-01-31 16:51:10 +0000
committerluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2007-01-31 16:51:10 +0000
commita4de59ca838b38d1c2f23e577865074c43b92593 (patch)
tree1c3d0919badb620bd62e17337ef5e641717fd5a2
parent9dc6cf6342a70c83b8422bffa3ada7f9e1e2c538 (diff)
downloadpuppet-a4de59ca838b38d1c2f23e577865074c43b92593.tar.gz
puppet-a4de59ca838b38d1c2f23e577865074c43b92593.tar.xz
puppet-a4de59ca838b38d1c2f23e577865074c43b92593.zip
Fixing rundir so that it is only set to be in /var if the process is named puppetd or puppetmasterd. Otherwise the unit tests set it to /var/run/puppet, which has the chance to cause hangs.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2134 980ebf18-57e1-0310-9a29-db15c13687c0
-rw-r--r--lib/puppet/configuration.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/puppet/configuration.rb b/lib/puppet/configuration.rb
index e89a8abad..80b855a7d 100644
--- a/lib/puppet/configuration.rb
+++ b/lib/puppet/configuration.rb
@@ -30,7 +30,9 @@ module Puppet
end
setdefaults(:puppet, :logdir => logopts)
- if Process.uid == 0
+ # This name hackery is necessary so that the rundir is set reasonably during
+ # unit tests.
+ if Process.uid == 0 and %w{puppetd puppetmasterd}.include?(self.name)
rundir = "/var/run/puppet"
else
rundir = "$vardir/run"