equal
deleted
inserted
replaced
|
1 Add auditing support to agent execution |
|
2 |
|
3 --- puppet-3.2.4/lib/puppet/agent.rb.orig 2013-03-08 16:03:45.000000000 -0700 |
|
4 +++ puppet-3.2.4/lib/puppet/agent.rb 2013-03-08 16:03:45.000000000 -0700 |
|
5 @@ -1,5 +1,8 @@ |
|
6 require 'sync' |
|
7 require 'puppet/application' |
|
8 +if Facter.value(:osfamily) == "Solaris" |
|
9 + require 'PuppetAudit' |
|
10 +end |
|
11 |
|
12 # A general class for triggering a run of another |
|
13 # class. |
|
14 @@ -35,6 +38,11 @@ |
|
15 return |
|
16 end |
|
17 |
|
18 + if Facter.value(:osfamily) == "Solaris" |
|
19 + audit_handle = PuppetAudit.new |
|
20 + audit_handle.audit_start |
|
21 + end |
|
22 + |
|
23 result = nil |
|
24 block_run = Puppet::Application.controlled_run do |
|
25 splay |
|
26 @@ -50,6 +58,10 @@ |
|
27 end |
|
28 end |
|
29 end |
|
30 + if Facter.value(:osfamily) == "Solaris" |
|
31 + audit_handle.audit_stop |
|
32 + audit_handle.audit_teardown |
|
33 + end |
|
34 true |
|
35 end |
|
36 Puppet.notice "Shutdown/restart in progress (#{Puppet::Application.run_status.inspect}); skipping run" unless block_run |