From b170d66a78b585dccf1e800f9c8e11575d5053ff Mon Sep 17 00:00:00 2001 From: Quentin Young Date: Wed, 14 Jun 2017 19:47:14 +0000 Subject: lib: allow 'do' commands in ENABLE_NODE 'do' is syntax sugar that allows the user to execute a command under ENABLE_NODE when in another CLI node. If the user is already in ENABLE_NODE, use of 'do' was previously disallowed. This patch allows it because it makes it easier for us to hack around certain instances of the node synchronization problem with vtysh. Also included is a fix for one of these problems. Signed-off-by: Quentin Young --- vtysh/vtysh.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'vtysh/vtysh.c') diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c index 30168a2d9..ffdfd5d72 100644 --- a/vtysh/vtysh.c +++ b/vtysh/vtysh.c @@ -2588,7 +2588,7 @@ int vtysh_write_config_integrated(void) { u_int i; - char line[] = "write terminal\n"; + char line[] = "do write terminal\n"; FILE *fp; int fd; struct passwd *pwentry; @@ -2713,7 +2713,7 @@ DEFUN (vtysh_write_memory, if (vtysh_client[i].flag == VTYSH_WATCHFRR) break; if (i < array_size(vtysh_client) && vtysh_client[i].fd != -1) - ret = vtysh_client_execute (&vtysh_client[i], "write integrated", stdout); + ret = vtysh_client_execute (&vtysh_client[i], "do write integrated", stdout); if (ret != CMD_SUCCESS) { -- cgit v1.2.3