aboutsummaryrefslogtreecommitdiffstats
path: root/src/sosreport
diff options
context:
space:
mode:
Diffstat (limited to 'src/sosreport')
-rwxr-xr-xsrc/sosreport13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/sosreport b/src/sosreport
index c2b1580a..59a577cd 100755
--- a/src/sosreport
+++ b/src/sosreport
@@ -466,6 +466,13 @@ def sosreport():
print
soslog.info ( _("sosreport (version %s)") % __version__)
print
+
+ # disable plugins that we read from conf files
+ conf_disable_plugins_list = []
+ if config.has_section("plugins"):
+ conf_disable_plugins = config.get("plugins", "disable").split(',')
+ for item in conf_disable_plugins:
+ conf_disable_plugins_list.append(item.strip())
# generate list of available plugins
plugins = os.listdir(pluginpath)
@@ -486,7 +493,8 @@ def sosreport():
continue
# plug-in is valid, let's decide whether run it or not
plugin_names.append(plugbase)
- if plugbase in __cmdLineOpts__.noplugins:
+ if plugbase in __cmdLineOpts__.noplugins or \
+ plugbase in conf_disable_plugins_list:
soslog.log(logging.VERBOSE, _("plugin %s skipped " \
"(--skip-plugins)") % plugbase)
skippedplugins.append((plugbase, pluginClass(plugbase, commons)))
@@ -531,7 +539,8 @@ def sosreport():
__cmdLineOpts__.plugopts = []
for opt, val in config.items("tunables"):
- __cmdLineOpts__.plugopts.append(opt + "=" + val)
+ if not opt.split('.')[0] in conf_disable_plugins_list:
+ __cmdLineOpts__.plugopts.append(opt + "=" + val)
if __cmdLineOpts__.plugopts:
opts = {}