From 8aa8b9dbc2437cea8109e4d272018437afe13794 Mon Sep 17 00:00:00 2001 From: Nick Lewis Date: Thu, 6 Jan 2011 17:39:03 -0800 Subject: (#5799) Simplify report dir creation This report processor was unnecessarily using Puppet to create a single directory. This was causing complex failures in any spec dealing with reports. Paired-With: Paul Berry --- lib/puppet/reports/store.rb | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) (limited to 'lib') diff --git a/lib/puppet/reports/store.rb b/lib/puppet/reports/store.rb index 30f24591c..99a9fc177 100644 --- a/lib/puppet/reports/store.rb +++ b/lib/puppet/reports/store.rb @@ -8,24 +8,6 @@ Puppet::Reports.register_report(:store) do to perform some maintenance on them if you use this report (it's the only default report)." - def mkclientdir(client, dir) - config = Puppet::Util::Settings.new - - config.setdefaults( - "reportclient-#{client}".to_sym, - "client-#{client}-dir" => { :default => dir, - :mode => 0750, - :desc => "Client dir for #{client}", - :owner => 'service', - :group => 'service' - }, - - :noop => [false, "Used by settings internally."] - ) - - config.use("reportclient-#{client}".to_sym) - end - def process # We don't want any tracking back in the fs. Unlikely, but there # you go. @@ -33,7 +15,7 @@ Puppet::Reports.register_report(:store) do dir = File.join(Puppet[:reportdir], client) - mkclientdir(client, dir) unless FileTest.exists?(dir) + Dir.mkdir(dir, 0750) unless FileTest.exists?(dir) # Now store the report. now = Time.now.gmtime -- cgit