Let the daemon option depend on the logfile option.
authorAndre Noll <maan@systemlinux.org>
Sun, 16 Mar 2008 13:16:17 +0000 (14:16 +0100)
committerAndre Noll <maan@systemlinux.org>
Sun, 16 Mar 2008 13:16:17 +0000 (14:16 +0100)
This allows to remove the check in server.c.

server.c
server.ggo

index a5ae026..90dfc1f 100644 (file)
--- a/server.c
+++ b/server.c
@@ -263,12 +263,6 @@ static void parse_config(int override)
                server_cmdline_parser_config_file(cf, &conf, &params);
                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;
index bbcb09b..a6ff8c9 100644 (file)
@@ -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.