diff options
Diffstat (limited to 'zebra/test_main.c')
| -rw-r--r-- | zebra/test_main.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/zebra/test_main.c b/zebra/test_main.c index 0f7e1a22be..f3ef3df96a 100644 --- a/zebra/test_main.c +++ b/zebra/test_main.c @@ -85,7 +85,7 @@ zebra_capabilities_t _caps_p [] = char config_default[] = SYSCONFDIR DEFAULT_CONFIG_FILE; /* Process ID saved for use by init system */ -const char *pid_file = PATH_ZEBRA_PID; +const char *pid_file = "testzebra.pid"; /* Help information display. */ static void @@ -100,7 +100,7 @@ usage (char *progname, int status) "redistribution between different routing protocols.\n\n"\ "-b, --batch Runs in batch mode\n"\ "-d, --daemon Runs in daemon mode\n"\ - "-a, --allow_delete Allow other processes to delete Quagga Routes\n" \ + "-a, --allow_delete Allow other processes to delete zebra routes\n" \ "-f, --config_file Set configuration file name\n"\ "-A, --vty_addr Set vty's bind address\n"\ "-P, --vty_port Set vty's port number\n"\ @@ -119,15 +119,14 @@ static ifindex_t test_ifindex = 0; /* testrib commands */ DEFUN (test_interface_state, test_interface_state_cmd, - "state (up|down)", + "state <up|down>", "configure interface\n" "up\n" "down\n") { + int idx_up_down = 1; VTY_DECLVAR_CONTEXT (interface, ifp); - if (argc < 1) - return CMD_WARNING; - + if (ifp->ifindex == IFINDEX_INTERNAL) { ifp->ifindex = ++test_ifindex; @@ -135,7 +134,7 @@ DEFUN (test_interface_state, ifp->flags = IFF_BROADCAST|IFF_MULTICAST; } - switch (argv[0][0]) + switch (argv[idx_up_down]->arg[0]) { case 'u': SET_FLAG (ifp->flags, IFF_UP); @@ -182,7 +181,7 @@ sigint (void) static void sigusr1 (void) { - zlog_rotate (NULL); + zlog_rotate(); } struct quagga_signal_t zebra_signals[] = @@ -223,8 +222,7 @@ main (int argc, char **argv) /* preserve my name */ progname = ((p = strrchr (argv[0], '/')) ? ++p : argv[0]); - zlog_default = openzlog (progname, ZLOG_ZEBRA, 0, - LOG_CONS|LOG_NDELAY|LOG_PID, LOG_DAEMON); + openzlog(progname, "ZEBRA", 0, LOG_CONS | LOG_NDELAY | LOG_PID, LOG_DAEMON); while (1) { |
