diff options
author | Ondrej Zajicek <santiago@crfreenet.org> | 2009-12-14 20:37:32 +0100 |
---|---|---|
committer | Ondrej Zajicek <santiago@crfreenet.org> | 2009-12-14 20:37:32 +0100 |
commit | 63542845dfb6d2277f93f77ad9ca3ad8bbaddd09 (patch) | |
tree | f65e7c59057a3db2bd80126ac5095d37a42fc2ce /sysdep | |
parent | 34a877ccac25d38172716d3d2488449c870cad0b (diff) | |
parent | 8a7fb8858fa87bce6f2f15ee2bbb77704b5fff4e (diff) |
Merge branch 'dev' into ospf3
Conflicts:
proto/ospf/lsreq.c
proto/ospf/lsupd.c
proto/ospf/rt.c
Diffstat (limited to 'sysdep')
-rw-r--r-- | sysdep/config.h | 2 | ||||
-rw-r--r-- | sysdep/unix/main.c | 20 |
2 files changed, 16 insertions, 6 deletions
diff --git a/sysdep/config.h b/sysdep/config.h index 03399bd0..11ade63e 100644 --- a/sysdep/config.h +++ b/sysdep/config.h @@ -7,7 +7,7 @@ #define _BIRD_CONFIG_H_ /* BIRD version */ -#define BIRD_VERSION "1.1.5" +#define BIRD_VERSION "1.1.6" /* Include parameters determined by configure script */ #include "sysdep/autoconf.h" diff --git a/sysdep/unix/main.c b/sysdep/unix/main.c index 17845d20..6107b226 100644 --- a/sysdep/unix/main.c +++ b/sysdep/unix/main.c @@ -313,8 +313,9 @@ async_shutdown(void) void sysdep_shutdown_done(void) { - unlink(PATH_CONTROL_SOCKET); - die("System shutdown completed"); + unlink(path_control_socket); + log_msg(L_FATAL "System shutdown completed"); + exit(0); } /* @@ -364,15 +365,17 @@ signal_init(void) * Parsing of command-line arguments */ -static char *opt_list = "c:dD:s:"; +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); } +int parse_and_exit; + static void parse_args(int argc, char **argv) { @@ -401,6 +404,9 @@ parse_args(int argc, char **argv) log_init_debug(optarg); debug_flag |= 2; break; + case 'p': + parse_and_exit = 1; + break; case 's': path_control_socket = optarg; break; @@ -428,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(); @@ -443,6 +450,9 @@ main(int argc, char **argv) read_config(); + if (parse_and_exit) + exit(0); + if (!debug_flag) { pid_t pid = fork(); |