code: def _check_pkgin():
      '''
      Looks to see if pkgin is present on the system, return full path
      '''
      ppath = salt.utils.path.which('pkgin')
      if ppath is None:
          # pkgin was not found in $PATH, try to find it via LOCALBASE
          try:
              localbase = __salt__['cmd.run'](
                 'pkg_info -Q LOCALBASE pkgin',
                  output_loglevel='trace'
              )
              if localbase is not None:
                  ppath = '{0}/bin/pkgin'.format(localbase)
                  if not os.path.exists(ppath):
                      return None
          except CommandExecutionError:
              return None
      return ppatf _check_pkgin():
      '''
      Looks to see if pkgin is present on the system, return full path
      '''
      ppath = salt.utils.path.which('pkgin')
      if ppath is None:
          # pkgin was not found in $PATH, try to find it via LOCALBASE
          try:
              localbase = __salt__['cmd.run'](
                 'pkg_info -Q LOCALBASE pkgin',
                  output_loglevel='trace'
              )
              if localbase is not None:
                  ppath = '{0}/bin/pkgin'.format(localbase)
                  if not os.path.exists(ppath):
                      return None
          except CommandExecutionError:
              return None
      return ppath
docs: Looks to see if pkgin is present on the system, return full path