Sophie

Sophie

distrib > Fedora > 18 > i386 > by-pkgid > ed6f702684c22374cb6904fb0c5cfdcb > files > 2

setroubleshoot-3.2.3-3.fc18.src.rpm

diff -up setroubleshoot-3.2.3/src/setroubleshootd.timeout setroubleshoot-3.2.3/src/setroubleshootd
--- setroubleshoot-3.2.3/src/setroubleshootd.timeout	2012-07-10 08:59:53.000000000 -0400
+++ setroubleshoot-3.2.3/src/setroubleshootd	2013-04-19 13:55:38.675270996 -0400
@@ -37,16 +37,16 @@ syslog.openlog(pkg_name)
 def usage():
     print '''
 -f --nofork				no fork
+-D --debug                              debug
 -c --config section.option=value	set a configuration value
--v --verbose                            log INFO level and higher messages to console
--V --debug                              log DEBUG level and higher messages to console
 -h --help				display help info
 '''
 
 fork = True
+timeout = 10
 
 try:
-    opts, args = getopt.getopt(sys.argv[1:], "fc:h", ["nofork","config=","help"])
+    opts, args = getopt.getopt(sys.argv[1:], "dfc:h", ["debug", "nofork","config=","help"])
 except getopt.GetoptError:
     # print help information and exit:
     usage()
@@ -60,6 +60,9 @@ for o, a in opts:
     if o in ("-f", "--nofork"):
         fork = False
 
+    if o in ("-d", "--debug"):
+	timeout = 0 
+
     if o in ("-c", "--config"):
         config_setting = a
         if not parse_config_setting(config_setting):
@@ -73,9 +76,7 @@ import dbus.service
 import dbus
 
 try: 
-    timeout = 0
     if fork:
-        timeput = 10
         # do the UNIX double-fork magic, see Stevens' "Advanced 
         # Programming in the UNIX Environment" for details (ISBN 0201563177)
         pid = os.fork() 
@@ -95,6 +96,8 @@ try:
         f.close()
     
     from setroubleshoot.server import RunFaultServer
+    syslog.syslog(syslog.LOG_DEBUG, _("RunFaultServer(%d)") % timeout)
+
     RunFaultServer(timeout)
     
 except OSError, e: