diff options
| author | Matt Robinson <matt@puppetlabs.com> | 2010-07-12 16:57:35 -0700 |
|---|---|---|
| committer | Markus Roberts <Markus@reality.com> | 2010-07-13 23:09:36 -0700 |
| commit | 27d5a4782c442908c71bb9abac9f78654581eacf (patch) | |
| tree | 171130ced6e281b021215dc3f1fb35e5121e7e5e /lib | |
| parent | 06cc552b8b1196ff833eb911eccf1c234d4b0d67 (diff) | |
[#4215] Have rundir depend on vardir
This came up because if you ran puppetd with a specific vardir, then
when rundir got set to a hardcoded value its parent directory might not
exist and the whole thing would fail.
This change came about with the concept of run_mode, and this fix is
restoring the behaviour that was in 0.25.x
Reviewed-by: Jesse Wolfe
Signed-off-by: Matt Robinson <matt@puppetlabs.com>
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/puppet/util/run_mode.rb | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/puppet/util/run_mode.rb b/lib/puppet/util/run_mode.rb index eb9c511dc..450cbf1a6 100644 --- a/lib/puppet/util/run_mode.rb +++ b/lib/puppet/util/run_mode.rb @@ -40,17 +40,17 @@ module Puppet end def run_dir - which_dir("/var/run/puppet", "~/.puppet/var") + "$vardir/run" end def logopts - if name == :master + if master? { :default => "$vardir/log", - :mode => 0750, - :owner => "service", - :group => "service", - :desc => "The Puppet log directory." + :mode => 0750, + :owner => "service", + :group => "service", + :desc => "The Puppet log directory." } else ["$vardir/log", "The Puppet log directory."] @@ -64,9 +64,9 @@ module Puppet # there's a comment that suggests that we do that # and we currently don't. expand_path case - when name == :master; global - when Puppet.features.root?; global - else user + when name == :master; global + when Puppet.features.root?; global + else user end end |
