mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-14 22:10:19 +00:00
lib: Fix show running-config
and write terminal
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
This commit is contained in:
parent
5e6a74d811
commit
066242b5c6
@ -2160,15 +2160,18 @@ DEFUN (vtysh_write_terminal,
|
|||||||
vtysh_write_terminal_cmd,
|
vtysh_write_terminal_cmd,
|
||||||
"write terminal [<zebra|ripd|ripngd|ospfd|ospf6d|bgpd|isisd|pimd>]",
|
"write terminal [<zebra|ripd|ripngd|ospfd|ospf6d|bgpd|isisd|pimd>]",
|
||||||
"Write running configuration to memory, network, or terminal\n"
|
"Write running configuration to memory, network, or terminal\n"
|
||||||
"Write to terminal\n")
|
"Write to terminal\n"
|
||||||
|
"For the zebra daemon\n"
|
||||||
|
"For the rip daemon\n"
|
||||||
|
"For the ripng daemon\n"
|
||||||
|
"For the ospf daemon\n"
|
||||||
|
"For the ospfv6 daemon\n"
|
||||||
|
"For the bgp daemon\n"
|
||||||
|
"For the isis daemon\n"
|
||||||
|
"For the pim daemon\n")
|
||||||
{
|
{
|
||||||
if (argc == 3)
|
u_int i;
|
||||||
{
|
char line[] = "write terminal\n";
|
||||||
for (unsigned int i = 0; i < array_size(vtysh_client); i++)
|
|
||||||
if (begins_with(vtysh_client[i].name, argv[2]->arg))
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
FILE *fp = NULL;
|
FILE *fp = NULL;
|
||||||
|
|
||||||
if (vtysh_pager_name)
|
if (vtysh_pager_name)
|
||||||
@ -2188,6 +2191,10 @@ DEFUN (vtysh_write_terminal,
|
|||||||
VTY_NEWLINE);
|
VTY_NEWLINE);
|
||||||
vty_out (vty, "!%s", VTY_NEWLINE);
|
vty_out (vty, "!%s", VTY_NEWLINE);
|
||||||
|
|
||||||
|
for (i = 0; i < array_size(vtysh_client); i++)
|
||||||
|
if ((argc < 3 ) || (strmatch (vtysh_client[i].name, argv[2]->text)))
|
||||||
|
vtysh_client_config (&vtysh_client[i], line);
|
||||||
|
|
||||||
/* Integrate vtysh specific configuration. */
|
/* Integrate vtysh specific configuration. */
|
||||||
vtysh_config_write ();
|
vtysh_config_write ();
|
||||||
|
|
||||||
@ -2205,7 +2212,6 @@ DEFUN (vtysh_write_terminal,
|
|||||||
}
|
}
|
||||||
|
|
||||||
vty_out (vty, "end%s", VTY_NEWLINE);
|
vty_out (vty, "end%s", VTY_NEWLINE);
|
||||||
|
|
||||||
return CMD_SUCCESS;
|
return CMD_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user