]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Fix -p option.
authorOndrej Zajicek <santiago@crfreenet.org>
Thu, 26 Nov 2009 22:23:29 +0000 (23:23 +0100)
committerOndrej Zajicek <santiago@crfreenet.org>
Thu, 26 Nov 2009 22:23:29 +0000 (23:23 +0100)
doc/bird.sgml
sysdep/unix/main.c

index d08b0c170e46bbfebb7187a72e6f233c2b2d7fd2..1f494cce99f92eb6f7381986a4b98d6b161a7065 100644 (file)
@@ -132,7 +132,8 @@ options. The most important ones are:
        log debugging information to given file instead of stderr.
 
        <tag>-p</tag>
-       just parse the config file and exit.
+       just parse the config file and exit. Return value is zero if the config file is valid,
+       nonzero if there are some errors.
 
        <tag>-s <m/name of communication socket/</tag>
        use given filename for a  socket for communications with the client, default is <it/prefix/<file>/var/run/bird.ctl</file>.
index 533754ea3ea02622d2e1089213397aadf9ca45c6..6107b2263890408eea1d9d6420affeab78cfaa7a 100644 (file)
@@ -370,7 +370,7 @@ static char *opt_list = "c:dD:ps:";
 static void
 usage(void)
 {
-  fprintf(stderr, "Usage: bird [-c <config-file>] [-d] [-D <debug-file>] [-s <control-socket>]\n");
+  fprintf(stderr, "Usage: bird [-c <config-file>] [-d] [-D <debug-file>] [-p] [-s <control-socket>]\n");
   exit(1);
 }
 
@@ -434,7 +434,8 @@ main(int argc, char **argv)
     log_init_debug("");
   log_init(debug_flag, 1);
 
-  test_old_bird(path_control_socket);
+  if (!parse_and_exit)
+    test_old_bird(path_control_socket);
 
   DBG("Initializing.\n");
   resource_init();