From 358e5ba36c8b17745d96790cb125eb2160817387 Mon Sep 17 00:00:00 2001 From: jwbernin Date: Sat, 22 Jul 2006 19:49:23 +0000 Subject: Merging jwb-dev branch to trunk git-svn-id: svn+ssh://svn.fedorahosted.org/svn/sos/trunk@36 ef72aa8b-4018-0410-8976-d6e080ef94d8 --- src/sosreport | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src/sosreport') diff --git a/src/sosreport b/src/sosreport index 5ebea18f..5aa7063f 100755 --- a/src/sosreport +++ b/src/sosreport @@ -26,6 +26,7 @@ from optparse import OptionParser import sos.policyredhat from sos.helpers import * from snack import * +from threading import Thread if os.getuid() != 0: print 'You must run sosreport as root!' @@ -109,6 +110,7 @@ def sosreport(): "This is the top-level function that gathers and processes all sosreport information" loadedplugins = [] alloptions = [] + threads = [] # TODO automatically locate the policy module?? policy = sos.policyredhat.SosPolicy() @@ -206,9 +208,17 @@ def sosreport(): for plug, plugname, optname, optparm in alloptions: plug.setOption(optname,1) + # Call the setup method for each plugin + for plugname, plug in loadedplugins: + plug.setup() + # Call the collect method for each plugin for plugname, plug in loadedplugins: - plug.collect() + plug.doCollect() + + # Wait for all the collcetion threads to exit + for plugname, plug in loadedplugins: + plug.wait() # Call the analyze method for each plugin for plugname, plug in loadedplugins: -- cgit