summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpaul <paul>2003-01-25 06:56:09 +0000
committerpaul <paul>2003-01-25 06:56:09 +0000
commit7396196dfd574ea557f00bb91c5f31b4c0d046c7 (patch)
treea6d9572e27ee76a7a81fa3a1c426a146d6e6e603
parentabbf08dfb7a4b977582584433f79d34e6494e300 (diff)
downloadquagga-patch.vtysh.add.ssh.fix.tar.bz2
quagga-patch.vtysh.add.ssh.fix.tar.xz
Small fix (free integrate_sav) and addition of an ssh command.patch.vtysh.add.ssh.fix
-rw-r--r--vtysh/vtysh.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c
index 3492e741..5e21504c 100644
--- a/vtysh/vtysh.c
+++ b/vtysh/vtysh.c
@@ -1271,6 +1271,7 @@ int write_config_integrated(void)
/* Move current configuration file to backup config file */
unlink (integrate_sav);
rename (integrate_default, integrate_sav);
+ free (integrate_sav);
fp = fopen (integrate_default, "w");
if (fp == NULL)
@@ -1440,6 +1441,16 @@ DEFUN (vtysh_telnet_port,
return CMD_SUCCESS;
}
+DEFUN (vtysh_ssh,
+ vtysh_ssh_cmd,
+ "ssh WORD",
+ "Open an ssh connection\n"
+ "[user@]host\n")
+{
+ execute_command ("ssh", 1, argv[0], NULL);
+ return CMD_SUCCESS;
+}
+
DEFUN (vtysh_start_shell,
vtysh_start_shell_cmd,
"start-shell",
@@ -1843,6 +1854,7 @@ vtysh_init_vty ()
install_element (VIEW_NODE, &vtysh_traceroute_cmd);
install_element (VIEW_NODE, &vtysh_telnet_cmd);
install_element (VIEW_NODE, &vtysh_telnet_port_cmd);
+ install_element (VIEW_NODE, &vtysh_ssh_cmd);
install_element (ENABLE_NODE, &vtysh_ping_cmd);
install_element (ENABLE_NODE, &vtysh_traceroute_cmd);
install_element (ENABLE_NODE, &vtysh_telnet_cmd);