Make "terminal length <0-512>" command work in vtysh.
diff --git a/lib/ChangeLog b/lib/ChangeLog
index 7c372df..ea965ea 100644
--- a/lib/ChangeLog
+++ b/lib/ChangeLog
@@ -1,3 +1,8 @@
+2004-08-27 Hasso Tepper <hasso at quagga.net>
+
+ * command.c: Install "terminal length" commands only if vty is used.
+ Vtysh will handle it itself.
+
2004-08-26 Greg Troxel <gdt@fnord.ir.bbn.com>
* sockopt.h: Define method-independent macro for callers of
diff --git a/lib/command.c b/lib/command.c
index 8b6ae3d..088ad38 100644
--- a/lib/command.c
+++ b/lib/command.c
@@ -3300,8 +3300,11 @@
}
install_element (ENABLE_NODE, &show_startup_config_cmd);
install_element (ENABLE_NODE, &show_version_cmd);
- install_element (ENABLE_NODE, &config_terminal_length_cmd);
- install_element (ENABLE_NODE, &config_terminal_no_length_cmd);
+ if (terminal)
+ {
+ install_element (ENABLE_NODE, &config_terminal_length_cmd);
+ install_element (ENABLE_NODE, &config_terminal_no_length_cmd);
+ }
if (terminal)
install_default (CONFIG_NODE);