# File lib/mcollective/rpc/actionrunner.rb, line 36
      def run
        unless canrun?(command)
          Log.warn("Cannot run #{to_s}")
          raise RPCAborted, "Cannot execute #{to_s}"
        end

        Log.debug("Running #{to_s}")

        request_file = saverequest(request)
        reply_file = tempfile("reply")
        reply_file.close

        runner = shell(command, request_file.path, reply_file.path)

        runner.runcommand

        Log.debug("#{command} exited with #{runner.status.exitstatus}")

        stderr.each_line {|l| Log.error("#{to_s}: #{l.chomp}")} unless stderr.empty?
        stdout.each_line {|l| Log.info("#{to_s}: #{l.chomp}")} unless stdout.empty?

        {:exitstatus => runner.status.exitstatus,
         :stdout     => runner.stdout,
         :stderr     => runner.stderr,
         :data       => load_results(reply_file.path)}
      ensure
        request_file.close! if request_file.respond_to?("close!")
        reply_file.close! if reply_file.respond_to?("close")
      end