]> git.tue.mpg.de Git - paraslash.git/commitdiff
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 a5ae0268cfde442345cd2c0993f6a95ce07f1c2a..90dfc1f58962f69355775fd87e4c08f8253efeac 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 bbcb09b8a07e71654f812cd11891cccf93fec6ea..a6ff8c922a51e219685ce190bbe83a608c8b8b9c 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.