code: def _get_svc(rcd, service_status):
      '''
      Returns a unique service status
      '''
      ena = None
      lines = __salt__['cmd.run']('{0} rcvar'.format(rcd)).splitlines()
      for rcvar in lines:
          if rcvar.startswith('$') and '={0}'.format(service_status) in rcvar:
              ena = 'yes'
          elif rcvar.startswith('#'):
              svc = rcvar.split(' ', 1)[1]
          else:
              continue
  
      if ena and svc:
          return svc
      return Nonf _get_svc(rcd, service_status):
      '''
      Returns a unique service status
      '''
      ena = None
      lines = __salt__['cmd.run']('{0} rcvar'.format(rcd)).splitlines()
      for rcvar in lines:
          if rcvar.startswith('$') and '={0}'.format(service_status) in rcvar:
              ena = 'yes'
          elif rcvar.startswith('#'):
              svc = rcvar.split(' ', 1)[1]
          else:
              continue
  
      if ena and svc:
          return svc
      return None
docs: Returns a unique service status