diff options
Diffstat (limited to 'zebra/test_main.c')
| -rw-r--r-- | zebra/test_main.c | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/zebra/test_main.c b/zebra/test_main.c index 0f7e1a22be..83c1ebb178 100644 --- a/zebra/test_main.c +++ b/zebra/test_main.c @@ -11,10 +11,9 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * You should have received a copy of the GNU General Public License along + * with this program; see the file COPYING; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include <zebra.h> @@ -85,7 +84,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 +99,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 +118,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 +133,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 +180,7 @@ sigint (void) static void sigusr1 (void) { - zlog_rotate (NULL); + zlog_rotate(); } struct quagga_signal_t zebra_signals[] = @@ -223,8 +221,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) { |
