From 1431556c8c62748474de03f2b66df75480ff3641 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Sun, 16 Mar 2008 14:16:17 +0100 Subject: [PATCH] Let the daemon option depend on the logfile option. This allows to remove the check in server.c. --- server.c | 6 ------ server.ggo | 1 + 2 files changed, 1 insertion(+), 6 deletions(-) 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. -- 2.39.2