From 25d5ebd4f5b37d18153942f634f8a3e69daf4288 Mon Sep 17 00:00:00 2001 From: luke Date: Fri, 25 May 2007 02:10:17 +0000 Subject: 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 --- lib/puppet/reports/rrdgraph.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib') 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) -- cgit