diff options
author | astokes <astokes@ef72aa8b-4018-0410-8976-d6e080ef94d8> | 2009-09-14 15:25:55 +0000 |
---|---|---|
committer | astokes <astokes@ef72aa8b-4018-0410-8976-d6e080ef94d8> | 2009-09-14 15:25:55 +0000 |
commit | 8ff194e93c1b6fe662a1ce7aa6ebd2d2bec80fd2 (patch) | |
tree | 2d953c369eda01889f0bb771854a4d83e1a3a2b1 /src/sosreport | |
parent | 7451f778388b9d1c3fcae8ddd2249c023d439db0 (diff) | |
download | sos-8ff194e93c1b6fe662a1ce7aa6ebd2d2bec80fd2.tar.gz |
merge from sos-conf branch
git-svn-id: svn+ssh://svn.fedorahosted.org/svn/sos/trunk@642 ef72aa8b-4018-0410-8976-d6e080ef94d8
Diffstat (limited to 'src/sosreport')
-rwxr-xr-x | src/sosreport | 13 |
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 = {} |