--- InitScriptCheck.py +++ InitScriptCheck.py @@ -18,7 +18,7 @@ import AbstractCheck import Config import Pkg - +import stat chkconfig_content_regex = re.compile('^\s*#\s*chkconfig:\s*([-0-9]+)\s+[-0-9]+\s+[-0-9]+') subsys_regex = re.compile('/var/lock/subsys/([^/"\'\n\s;&|]+)', re.MULTILINE) @@ -50,7 +50,8 @@ for fname, pkgfile in pkg.files().items(): if not fname.startswith('/etc/init.d/') and \ - not fname.startswith('/etc/rc.d/init.d/'): + not fname.startswith('/etc/rc.d/init.d/') and \ + stat.S_ISREG(pkgfile.mode): continue basename = os.path.basename(fname)