forked from pool/rpmlint
20 lines
616 B
Diff
20 lines
616 B
Diff
--- InitScriptCheck.py
|
|
+++ InitScriptCheck.py
|
|
@@ -15,6 +15,7 @@
|
|
import rpm
|
|
import Pkg
|
|
import string
|
|
+import stat
|
|
|
|
rc_regex=re.compile('^/etc(/rc\.d)?/init\.d/')
|
|
chkconfig_content_regex=re.compile('^\s*#\s*chkconfig:\s*([-0-9]+)\s+[-0-9]+\s+[-0-9]+')
|
|
@@ -40,7 +41,7 @@
|
|
|
|
initscript_list = []
|
|
for f in pkg.files().keys():
|
|
- if rc_regex.search(f):
|
|
+ if rc_regex.search(f) and stat.S_ISREG(pkg.files()[f][0]):
|
|
basename=basename_regex.search(f).group(1)
|
|
initscript_list.append(basename)
|
|
if pkg.files()[f][0] & 0500 != 0500:
|