summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/ChangeLog7
-rw-r--r--lib/command.c30
-rw-r--r--lib/command.h1
-rw-r--r--lib/vty.c1
4 files changed, 22 insertions, 17 deletions
diff --git a/lib/ChangeLog b/lib/ChangeLog
index e92147f3..3049b95a 100644
--- a/lib/ChangeLog
+++ b/lib/ChangeLog
@@ -1,3 +1,10 @@
+2004-10-03 Hasso Tepper <hasso at quagga.net>
+
+ * command.h: Introduce SERVICE_NODE for "service <...>" commands.
+ * command.c: Don't initialize commands that don't make sense if vtysh
+ is used.
+ * vty.c: Make VTY_NODE appear in vtysh.
+
2004-10-03 James R. Leu <jleu at mindspring.com>
* zclient.c, zclient.h: zclient functions for router id handling.
diff --git a/lib/command.c b/lib/command.c
index 2ed62526..a4cf9ebf 100644
--- a/lib/command.c
+++ b/lib/command.c
@@ -3300,23 +3300,22 @@ cmd_init (int terminal)
}
install_element (ENABLE_NODE, &show_startup_config_cmd);
install_element (ENABLE_NODE, &show_version_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);
- install_element (CONFIG_NODE, &hostname_cmd);
- install_element (CONFIG_NODE, &no_hostname_cmd);
- install_element (CONFIG_NODE, &password_cmd);
- install_element (CONFIG_NODE, &password_text_cmd);
- install_element (CONFIG_NODE, &enable_password_cmd);
- install_element (CONFIG_NODE, &enable_password_text_cmd);
- install_element (CONFIG_NODE, &no_enable_password_cmd);
- if (terminal)
{
+ install_element (ENABLE_NODE, &config_terminal_length_cmd);
+ install_element (ENABLE_NODE, &config_terminal_no_length_cmd);
+
+ install_default (CONFIG_NODE);
+
+ install_element (CONFIG_NODE, &hostname_cmd);
+ install_element (CONFIG_NODE, &no_hostname_cmd);
+ install_element (CONFIG_NODE, &password_cmd);
+ install_element (CONFIG_NODE, &password_text_cmd);
+ install_element (CONFIG_NODE, &enable_password_cmd);
+ install_element (CONFIG_NODE, &enable_password_text_cmd);
+ install_element (CONFIG_NODE, &no_enable_password_cmd);
+
install_element (CONFIG_NODE, &config_log_stdout_cmd);
install_element (CONFIG_NODE, &no_config_log_stdout_cmd);
install_element (CONFIG_NODE, &config_log_file_cmd);
@@ -3335,10 +3334,7 @@ cmd_init (int terminal)
install_element (CONFIG_NODE, &no_banner_motd_cmd);
install_element (CONFIG_NODE, &service_terminal_length_cmd);
install_element (CONFIG_NODE, &no_service_terminal_length_cmd);
- }
- if (terminal)
- {
install_element(VIEW_NODE, &show_thread_cpu_cmd);
install_element(ENABLE_NODE, &show_thread_cpu_cmd);
}
diff --git a/lib/command.h b/lib/command.h
index 32a347fc..d1648d68 100644
--- a/lib/command.h
+++ b/lib/command.h
@@ -71,6 +71,7 @@ enum node_type
AUTH_ENABLE_NODE, /* Authentication mode for change enable. */
ENABLE_NODE, /* Enable node. */
CONFIG_NODE, /* Config node. Default mode of config file. */
+ SERVICE_NODE, /* Service node. */
DEBUG_NODE, /* Debug node. */
AAA_NODE, /* AAA node. */
KEYCHAIN_NODE, /* Key-chain node. */
diff --git a/lib/vty.c b/lib/vty.c
index fdd5bbdb..3e799b88 100644
--- a/lib/vty.c
+++ b/lib/vty.c
@@ -2670,6 +2670,7 @@ struct cmd_node vty_node =
{
VTY_NODE,
"%s(config-line)# ",
+ 1,
};
/* Reset all VTY status. */