diff options
author | Jeremy Katz <katzj@redhat.com> | 2008-04-01 20:11:50 -0400 |
---|---|---|
committer | Jeremy Katz <katzj@redhat.com> | 2008-04-01 20:12:25 -0400 |
commit | a106f244dea3a238ad3870989421a4a2c85d35e2 (patch) | |
tree | 687b32294e4b70dcccbe04cc3ba782ae347bf780 /anaconda | |
parent | 70941d9b33543769ba589633f67481f7f6769125 (diff) | |
download | anaconda-a106f244dea3a238ad3870989421a4a2c85d35e2.tar.gz anaconda-a106f244dea3a238ad3870989421a4a2c85d35e2.tar.xz anaconda-a106f244dea3a238ad3870989421a4a2c85d35e2.zip |
Only do verbose hal logging if loglevel=debug
Diffstat (limited to 'anaconda')
-rwxr-xr-x | anaconda | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -55,12 +55,12 @@ def startDBus(): return None return pid -def startHal(root='/'): +def startHal(root='/', verbose=False): if not os.access("/usr/sbin/hald", os.X_OK): return None fd = open("/dev/null","rw") args = ["/usr/sbin/hald","--use-syslog"] - if log.getEffectiveLevel() < logging.INFO: + if verbose: args = args + ["--verbose=yes"] try: pid = subprocess.Popen(args, stdin = fd, stdout = fd, stderr = fd, close_fds = True).pid @@ -756,7 +756,10 @@ if __name__ == "__main__": halobj = bus.get_object("org.freedesktop.Hal","/org/freedesktop/Hal/Manager") except dbus.exceptions.DBusException: log.info("Starting HAL daemon...") - pid = startHal() + verbose = False + if opts.loglevel == "debug": + verbose = True + pid = startHal(verbose = verbose) if not pid: log.error("Unable to start HAL daemon") time.sleep(5) |