# File lib/rubyipmi/commands/basecommand.rb, line 54
    def run(debug=false)
      # we search for the command everytime just in case its removed during execution
      # we also don't want to add this to the initialize since mocking is difficult and we don't want to
      # throw errors upon object creation
      retrycount = 0
      process_status = false
      @cmd = locate_command(@cmdname)
      setpass
      @result = nil
      if debug
        # Log error
        return makecommand
      end

      begin
        command = makecommand
        @lastcall = "#{command}"
        @result = `#{command} 2>&1`
        # sometimes the command tool does not return the correct result so we have to validate it with additional
        # code
        process_status = validate_status($?)
      rescue
        if retrycount < max_retry_count
          find_fix(@result)
          retrycount = retrycount.next
          retry
        else
          raise "Exhausted all auto fixes, cannot determine what the problem is"
        end
      ensure
        removepass
        return process_status

      end

    end