2015-04-10 16:35:46 +02:00
|
|
|
From: Some One <nobody@opensuse.org>
|
|
|
|
Date: Thu, 9 Apr 2015 14:55:39 +0200
|
|
|
|
Subject: [PATCH] only-reg-files-are-scripts.diff
|
|
|
|
|
2010-10-20 15:23:06 +02:00
|
|
|
===================================================================
|
2015-04-10 16:35:46 +02:00
|
|
|
---
|
|
|
|
InitScriptCheck.py | 5 ++++-
|
|
|
|
1 file changed, 4 insertions(+), 1 deletion(-)
|
|
|
|
|
2017-09-28 13:35:09 +02:00
|
|
|
Index: rpmlint-rpmlint-1.10/InitScriptCheck.py
|
|
|
|
===================================================================
|
|
|
|
--- rpmlint-rpmlint-1.10.orig/InitScriptCheck.py
|
|
|
|
+++ rpmlint-rpmlint-1.10/InitScriptCheck.py
|
|
|
|
@@ -17,7 +17,7 @@ import AbstractCheck
|
2010-10-14 14:32:03 +02:00
|
|
|
import Config
|
2017-09-28 13:35:09 +02:00
|
|
|
from Filter import addDetails, printError, printWarning
|
2008-04-17 04:52:37 +02:00
|
|
|
import Pkg
|
2010-10-14 14:32:03 +02:00
|
|
|
-
|
2008-04-17 04:52:37 +02:00
|
|
|
+import stat
|
|
|
|
|
2017-09-28 13:35:09 +02:00
|
|
|
chkconfig_content_regex = re.compile(r'^\s*#\s*chkconfig:\s*([-0-9]+)\s+[-0-9]+\s+[-0-9]+')
|
|
|
|
subsys_regex = re.compile(r'/var/lock/subsys/([^/"\'\s;&|]+)', re.MULTILINE)
|
|
|
|
@@ -49,6 +49,9 @@ class InitScriptCheck(AbstractCheck.Abst
|
2010-10-20 15:23:06 +02:00
|
|
|
not fname.startswith('/etc/rc.d/init.d/'):
|
2010-10-14 14:32:03 +02:00
|
|
|
continue
|
|
|
|
|
2010-10-20 15:23:06 +02:00
|
|
|
+ if not stat.S_ISREG(pkgfile.mode):
|
|
|
|
+ continue
|
|
|
|
+
|
2010-10-14 14:32:03 +02:00
|
|
|
basename = os.path.basename(fname)
|
2010-10-20 15:23:06 +02:00
|
|
|
initscript_list.append(basename)
|
2017-09-28 13:35:09 +02:00
|
|
|
if pkgfile.mode & 0o500 != 0o500:
|