summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Noll <maan@systemlinux.org>2010-04-17 14:43:00 +0200
committerAndre Noll <maan@systemlinux.org>2010-06-17 22:33:30 +0200
commitc279f1a5bd474f002f8486aafbfd0b7f0d4e15c3 (patch)
tree8469b1e4b267162da0f0178189bfcfe77c5f58b2
parentf92d4b984e14d18f468151ac8596dc0159ff838e (diff)
Use logfile only for --run --daemon.
In all other cases it does not really make sense, so it is better to write log output to stderr in these cases, even if --logfile was given.
-rw-r--r--dss.c2
-rw-r--r--dss.ggo7
2 files changed, 5 insertions, 4 deletions
diff --git a/dss.c b/dss.c
index 531beb6..e32e7e2 100644
--- a/dss.c
+++ b/dss.c
@@ -884,7 +884,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 7934db3..8f1ec5c 100644
--- 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.
"
##################