Fix vtysh based "write term" output.
* vtysh/vtysh.c: "end" should be printed at the bottom, not the top.
* vtysh/vtysh_config.c: PROTOCOL_NODE was not being handled, and thus was
being displayed at the top of a config, rather than in its rightful
place near the bottom.
Signed-off-by: Chris Caputo <ccaputo@alt.net>
diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c
index bff0632..3f189ad 100644
--- a/vtysh/vtysh.c
+++ b/vtysh/vtysh.c
@@ -1722,8 +1722,6 @@
vtysh_config_dump (fp);
- vty_out (vty, "end%s", VTY_NEWLINE);
-
if (vtysh_pager_name && fp)
{
fflush (fp);
@@ -1735,6 +1733,8 @@
fp = NULL;
}
+ vty_out (vty, "end%s", VTY_NEWLINE);
+
return CMD_SUCCESS;
}