Merge branch 't/logfile_only_for_daemon'
authorAndre Noll <maan@systemlinux.org>
Mon, 7 Feb 2011 16:56:36 +0000 (17:56 +0100)
committerAndre Noll <maan@systemlinux.org>
Mon, 7 Feb 2011 16:56:36 +0000 (17:56 +0100)
dss.c
dss.ggo

diff --git a/dss.c b/dss.c
index db065c689b95dc0274231c9923cb9be6dd852839..b4ad2d28960a3c89e9b489d365f45ffed1376e8e 100644 (file)
--- a/dss.c
+++ b/dss.c
@@ -964,7 +964,7 @@ static int parse_config_file(int override)
                        conf.logfile_given = 1;
                }
        }
-       if (conf.logfile_given) {
+       if (conf.logfile_given && conf.run_given && conf.daemon_given) {
                logfile = open_log(conf.logfile_arg);
                log_welcome(conf.loglevel_arg);
        }
diff --git a/dss.ggo b/dss.ggo
index 3a97568b2dab69b89e7ca9e22de4c9710cd7f9af..1662e0d36f514491c1029e674bc407a98012942d 100644 (file)
--- a/dss.ggo
+++ b/dss.ggo
@@ -77,9 +77,10 @@ option "logfile" -
 "Logfile for the dss daemon process"
 string typestr="filename"
 optional
-details="
-       This option is mostly useful for the run command if --daemon
-       is also given.
+details = "
+       This option is only honored if both --run and --daemon are
+       given. Otherwise it is silently ignored and log output is
+       written to stderr.
 "
 
 ##################