# File lib/puppet/application/agent.rb, line 104 104: def onetime 105: unless options[:client] 106: $stderr.puts "onetime is specified but there is no client" 107: exit(43) 108: return 109: end 110: 111: @daemon.set_signal_traps 112: 113: begin 114: report = @agent.run 115: rescue => detail 116: puts detail.backtrace if Puppet[:trace] 117: Puppet.err detail.to_s 118: end 119: 120: if not report 121: exit(1) 122: elsif not Puppet[:noop] and options[:detailed_exitcodes] then 123: exit(report.exit_status) 124: else 125: exit(0) 126: end 127: end