code: def _sysv_enabled(name, root):
      '''
      A System-V style service is assumed disabled if the "startup" symlink
      (starts with "S") to its script is found in /etc/init.d in the current
      runlevel.
      '''
      # Find exact match (disambiguate matches like "S01anacron" for cron)
      rc = _root('/etc/rc{}.d/S*{}'.format(_runlevel(), name), root)
      for match in glob.glob(rc):
          if re.match(r'S\d{,2}%s' % name, os.path.basename(match)):
              return True
      return Falsf _sysv_enabled(name, root):
      '''
      A System-V style service is assumed disabled if the "startup" symlink
      (starts with "S") to its script is found in /etc/init.d in the current
      runlevel.
      '''
      # Find exact match (disambiguate matches like "S01anacron" for cron)
      rc = _root('/etc/rc{}.d/S*{}'.format(_runlevel(), name), root)
      for match in glob.glob(rc):
          if re.match(r'S\d{,2}%s' % name, os.path.basename(match)):
              return True
      return False
docs: A System-V style service is assumed disabled if the "startup" symlink
      (starts with "S") to its script is found in /etc/init.d in the current
      runlevel.