code: def _chkconfig_is_enabled(name, runlevel=None):
      '''
      Return ``True`` if the service is enabled according to chkconfig; otherwise
      return ``False``.  If ``runlevel`` is ``None``, then use the current
      runlevel.
      '''
      cmdline = '/sbin/chkconfig --list {0}'.format(name)
      result = __salt__['cmd.run_all'](cmdline, python_shell=False)
  
      if runlevel is None:
          runlevel = _runlevel()
      if result['retcode'] == 0:
          for row in result['stdout'].splitlines():
              if '{0}:on'.format(runlevel) in row:
                  if row.split()[0] == name:
                      return True
              elif row.split() == [name, 'on']:
                  return True
      return Falsf _chkconfig_is_enabled(name, runlevel=None):
      '''
      Return ``True`` if the service is enabled according to chkconfig; otherwise
      return ``False``.  If ``runlevel`` is ``None``, then use the current
      runlevel.
      '''
      cmdline = '/sbin/chkconfig --list {0}'.format(name)
      result = __salt__['cmd.run_all'](cmdline, python_shell=False)
  
      if runlevel is None:
          runlevel = _runlevel()
      if result['retcode'] == 0:
          for row in result['stdout'].splitlines():
              if '{0}:on'.format(runlevel) in row:
                  if row.split()[0] == name:
                      return True
              elif row.split() == [name, 'on']:
                  return True
      return False
docs: Return ``True`` if the service is enabled according to chkconfig; otherwise
      return ``False``.  If ``runlevel`` is ``None``, then use the current
      runlevel.