diff options
| author | Sri Mohana Singamsetty <srimohans@gmail.com> | 2019-08-13 08:40:21 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-08-13 08:40:21 -0700 |
| commit | ce935bc2843cb35c5450e1ea9beb1c58474d6e2c (patch) | |
| tree | 3816a31181f5bd2bdad6d25fe855212f87821ecc | |
| parent | 3e31782374460a37f02bfa48dc7e48266c7cd238 (diff) | |
| parent | 13f48fd6759cfdec35f17e37037e587cab5ec8e1 (diff) | |
Merge pull request #4706 from qlyoung/fix-exit-vrf-markfile
vtysh: mark exit-vrf with end when using vtysh -m
| -rw-r--r-- | vtysh/vtysh.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c index cec5675e01..fba754f626 100644 --- a/vtysh/vtysh.c +++ b/vtysh/vtysh.c @@ -852,11 +852,15 @@ int vtysh_mark_file(const char *filename) return CMD_ERR_INCOMPLETE; case CMD_SUCCESS: vty_out(vty, "%s", vty->buf); + if (strmatch(vty_buf_trimmed, "exit-vrf")) + vty_out(vty, "end\n"); break; case CMD_SUCCESS_DAEMON: { int cmd_stat; vty_out(vty, "%s", vty->buf); + if (strmatch(vty_buf_trimmed, "exit-vrf")) + vty_out(vty, "end\n"); cmd_stat = vtysh_client_execute(&vtysh_client[0], vty->buf); if (cmd_stat != CMD_SUCCESS) |
