From: Andre Noll Date: Sun, 16 Mar 2008 13:16:17 +0000 (+0100) Subject: Let the daemon option depend on the logfile option. X-Git-Tag: v0.3.2~61^2~3 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=1431556c8c62748474de03f2b66df75480ff3641;hp=56ee850b0f0c8bd7a7cc16ad9dec148e6c955faa Let the daemon option depend on the logfile option. This allows to remove the check in server.c. --- diff --git a/server.c b/server.c index a5ae0268..90dfc1f5 100644 --- a/server.c +++ b/server.c @@ -263,12 +263,6 @@ static void parse_config(int override) server_cmdline_parser_config_file(cf, &conf, ¶ms); conf.daemon_given = tmp; } - /* logfile */ - if (!conf.logfile_given && conf.daemon_given) { - ret = -1; - PARA_EMERG_LOG("fatal: daemon option, but no log file given\n"); - goto out; - } if (conf.logfile_given) logfile = open_log(conf.logfile_arg); ret = 1; diff --git a/server.ggo b/server.ggo index bbcb09b8..a6ff8c92 100644 --- a/server.ggo +++ b/server.ggo @@ -26,6 +26,7 @@ option "daemon" d #~~~~~~~~~~~~~~~~ "run as background daemon" flag off +dependon="logfile" details=" Note that para_server refuses to start in daemon mode if no logfile was specified.