summaryrefslogtreecommitdiff
path: root/lib/command.c
diff options
context:
space:
mode:
authorRenato Westphal <renato@opensourcerouting.org>2016-10-12 12:39:02 -0300
committerDonald Sharp <sharpd@cumulusnetworks.com>2016-10-12 19:33:56 -0400
commit6694f68c3f641fc96ff844ec344a3e8f01998fa8 (patch)
tree3672e4bd7b679043cf320ef565000b2931cc710e /lib/command.c
parent039eaca36717fb9bfe415cc47b4d36848c54b51f (diff)
lib/vtysh: fix duplicate installation of some vty commands
This is a followup to commits 735e62 and 0b1442, where we forgot to apply the same VIEW/ENABLE consolidation logic to vtysh. Also, we can't call install_default() for the ENABLE node because some of the vty commands installed by this function were already installed in the VIEW node before. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'lib/command.c')
-rw-r--r--lib/command.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/command.c b/lib/command.c
index be243d44ea..fd4b2e2427 100644
--- a/lib/command.c
+++ b/lib/command.c
@@ -4220,10 +4220,15 @@ cmd_init (int terminal)
if (terminal)
{
- install_default (ENABLE_NODE);
+ install_element (ENABLE_NODE, &config_end_cmd);
install_element (ENABLE_NODE, &config_disable_cmd);
install_element (ENABLE_NODE, &config_terminal_cmd);
install_element (ENABLE_NODE, &copy_runningconfig_startupconfig_cmd);
+ install_element (ENABLE_NODE, &config_write_terminal_cmd);
+ install_element (ENABLE_NODE, &config_write_file_cmd);
+ install_element (ENABLE_NODE, &config_write_memory_cmd);
+ install_element (ENABLE_NODE, &config_write_cmd);
+ install_element (ENABLE_NODE, &show_running_config_cmd);
}
install_element (ENABLE_NODE, &show_startup_config_cmd);