summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2007-05-25 02:10:17 +0000
committerluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2007-05-25 02:10:17 +0000
commit25d5ebd4f5b37d18153942f634f8a3e69daf4288 (patch)
tree6d2d27f1b1fce462796c873495cc20d9fbaa85eb /lib
parent62a4d4c91df2aa6e7a6f28dfdf81f95f28987216 (diff)
downloadpuppet-25d5ebd4f5b37d18153942f634f8a3e69daf4288.tar.gz
puppet-25d5ebd4f5b37d18153942f634f8a3e69daf4288.tar.xz
puppet-25d5ebd4f5b37d18153942f634f8a3e69daf4288.zip
Adding more detail to the per-host reports dirs, since it was not setting mode or ownership.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2532 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib')
-rw-r--r--lib/puppet/reports/rrdgraph.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/puppet/reports/rrdgraph.rb b/lib/puppet/reports/rrdgraph.rb
index f2ec9cc83..5e5b4427e 100644
--- a/lib/puppet/reports/rrdgraph.rb
+++ b/lib/puppet/reports/rrdgraph.rb
@@ -99,10 +99,10 @@ Puppet::Network::Handler.report.newreport(:rrdgraph) do
def process(time = nil)
time ||= Time.now.to_i
- unless File.directory?(hostdir)
- # Some hackishness to create the dir
+ unless File.directory?(hostdir) and File.writeable?(hostdir)
+ # Some hackishness to create the dir with all of the right modes and ownership
config = Puppet::Util::Config.new
- config.setdefaults(:reports, :hostdir => [hostdir, "eh"])
+ config.setdefaults(:reports, :hostdir => {:default => hostdir, :owner => Puppet[:user], :mode => 0755, :group => Puppet[:group], :desc => "eh"})
# This creates the dir.
config.use(:reports)