summaryrefslogtreecommitdiffstats
path: root/anaconda
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2008-04-01 20:11:50 -0400
committerJeremy Katz <katzj@redhat.com>2008-04-01 20:12:25 -0400
commita106f244dea3a238ad3870989421a4a2c85d35e2 (patch)
tree687b32294e4b70dcccbe04cc3ba782ae347bf780 /anaconda
parent70941d9b33543769ba589633f67481f7f6769125 (diff)
downloadanaconda-a106f244dea3a238ad3870989421a4a2c85d35e2.tar.gz
anaconda-a106f244dea3a238ad3870989421a4a2c85d35e2.tar.xz
anaconda-a106f244dea3a238ad3870989421a4a2c85d35e2.zip
Only do verbose hal logging if loglevel=debug
Diffstat (limited to 'anaconda')
-rwxr-xr-xanaconda9
1 files changed, 6 insertions, 3 deletions
diff --git a/anaconda b/anaconda
index e0095ee7c..81be3d901 100755
--- a/anaconda
+++ b/anaconda
@@ -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)